Merge pull request #436 from embark-framework/fixConsolePluginCmdOutput

Fixed Returns From Plugin Modules
This commit is contained in:
Iuri Matias 2018-05-18 11:45:02 -04:00 committed by GitHub
commit 4439f8b601
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -38,7 +38,7 @@ class Console {
var pluginCmds = this.plugins.getPluginsProperty('console', 'console');
for (let pluginCmd of pluginCmds) {
let pluginOutput = pluginCmd.call(this, cmd, {});
if (pluginOutput !== false && pluginOutput !== 'false') return callback(pluginOutput);
if (pluginOutput !== false && pluginOutput !== 'false' && pluginOutput !== undefined) return callback(pluginOutput);
}
let output = this.processEmbarkCmd(cmd);

View File

@ -47,6 +47,7 @@ class Profiler {
self.logger.info("-- profile for " + contractName);
this.profile(contractName, contract);
});
return "";
}
return false;
});