From 6e4abcfed8d5d430612307c13d43a6962ee41e5a Mon Sep 17 00:00:00 2001 From: Pete Richards Date: Tue, 16 May 2017 15:08:05 -0700 Subject: [PATCH] [Style] Fix style --- src/plugins/timeConductor/plugin.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/plugins/timeConductor/plugin.js b/src/plugins/timeConductor/plugin.js index ad8a716781..7213ab024d 100644 --- a/src/plugins/timeConductor/plugin.js +++ b/src/plugins/timeConductor/plugin.js @@ -22,6 +22,10 @@ define([], function () { + function isTruthy(a) { + return !!a; + } + function validateMenuOption(menuOption, index) { if (menuOption.clock && !menuOption.clockOffsets) { return "clock-based menuOption at index " + index + " is " + @@ -45,7 +49,7 @@ define([], function () { } if (config.menuOptions.some(validateMenuOption)) { return config.menuOptions.map(validateMenuOption) - .filter(function (err) { return !!err; }) + .filter(isTruthy) .join('\n'); } return undefined; @@ -69,11 +73,11 @@ define([], function () { "timeSystem that does not exist: " + menuOption.timeSystem; } if (menuOption.clock && !clocks[menuOption.clock]) { - return "menuOption at index " + index + " specifies a " + - "clock that does not exist: " + menuOption.clock; + return "menuOption at index " + index + " specifies a " + + "clock that does not exist: " + menuOption.clock; } }) - .filter(function (err) { return !!err; }) + .filter(isTruthy) .join('\n'); }