fix syntax error, and actually show error if minification fails

v1.18.x
barisusakli 9 years ago
parent 1a87767c2c
commit c2e1426e57

@ -86,7 +86,7 @@ define('notifications', ['sounds', 'translator', 'components'], function(sound,
}); });
}; };
} else { } else {
payload.message: '[[notifications:you_have_unread_notifications]]'; payload.message = '[[notifications:you_have_unread_notifications]]';
payload.type = 'warning'; payload.type = 'warning';
} }

@ -128,8 +128,9 @@ module.exports = function(Meta) {
case 'error': case 'error':
winston.error('[meta/js] Could not compile ' + target + ': ' + message.payload.message); winston.error('[meta/js] Could not compile ' + target + ': ' + message.payload.message);
minifier.kill(); minifier.kill();
if (typeof callback === 'function') { if (typeof callback === 'function') {
callback(new Error(message.payload.message)); callback(new Error(message.payload));
} else { } else {
process.exit(0); process.exit(0);
} }

Loading…
Cancel
Save