concentrate undefined logic in the plugin output

Signed-off-by: VoR0220 <catalanor0220@gmail.com>
This commit is contained in:
VoR0220 2018-05-18 10:04:49 -05:00
parent bef490f5c7
commit 28fa906bbf
1 changed files with 4 additions and 2 deletions

View File

@ -38,11 +38,13 @@ class Console {
var pluginCmds = this.plugins.getPluginsProperty('console', 'console');
for (let pluginCmd of pluginCmds) {
let pluginOutput = pluginCmd.call(this, cmd, {});
//console.log("plugin output: ", pluginOutput)
if (pluginOutput !== false && pluginOutput !== 'false' && pluginOutput !== undefined)
return callback(pluginOutput);
if (pluginOutput === undefined) {
return callback("");
}
}
//console.log("Do we hit the here?")
let output = this.processEmbarkCmd(cmd);
if (output) {
return callback(output);