From fba30e359a26e3d390deb53e192c09a5e164f0b3 Mon Sep 17 00:00:00 2001 From: Ivar Date: Wed, 2 Nov 2016 23:24:23 +0100 Subject: [PATCH] fix lint --- packages/unleash-api/lib/db/client-strategies.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/unleash-api/lib/db/client-strategies.js b/packages/unleash-api/lib/db/client-strategies.js index ffe8d7a55c..262b810828 100644 --- a/packages/unleash-api/lib/db/client-strategies.js +++ b/packages/unleash-api/lib/db/client-strategies.js @@ -26,7 +26,11 @@ module.exports = function (db) { .where('app_name', appName) .map(row => ({ count: row.count })) .then(rows => { - return rows[0].count > 0 ? update(appName, strategies) : insert(appName, strategies); + if (rows[0].count > 0) { + return update(appName, strategies); + } else { + return insert(appName, strategies); + } }); }