From cf7540d41c14e09a11d56e62c2220b18d1d5620b Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Fri, 8 Jul 2016 11:03:28 -0400 Subject: [PATCH] appeasing Travis CI, 'cause fuck code reuse, right? --- src/meta/js.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/meta/js.js b/src/meta/js.js index 0f4fd87c28..9d8b1d6c34 100644 --- a/src/meta/js.js +++ b/src/meta/js.js @@ -154,12 +154,6 @@ module.exports = function(Meta) { winston.verbose('[meta/js] ' + target + ' minification complete'); minifier.kill(); - function done() { - if (typeof callback === 'function') { - callback(); - } - } - if (process.send && Meta.js.target['nodebb.min.js'] && Meta.js.target['acp.min.js']) { process.send({ action: 'js-propagate', @@ -168,10 +162,16 @@ module.exports = function(Meta) { } if (nconf.get('local-assets') === undefined || nconf.get('local-assets') !== false) { - return Meta.js.commitToFile(target, done); + return Meta.js.commitToFile(target, function() { + if (typeof callback === 'function') { + callback(); + } + }); } else { emitter.emit('meta:js.compiled'); - return done(); + if (typeof callback === 'function') { + return callback(); + } } break;