Update name

This commit is contained in:
Anthony Laibe 2018-08-15 15:07:48 +01:00 committed by Iuri Matias
parent 764a4f863b
commit 95c23f64b3
1 changed files with 2 additions and 2 deletions

View File

@ -37,12 +37,12 @@ class CodeRunner {
RunCode.registerVar(varName, code); RunCode.registerVar(varName, code);
}); });
this.events.setCommandHandler('runcode:eval', (code, cb, saveForConsole = false) => { this.events.setCommandHandler('runcode:eval', (code, cb, forConsoleOnly = false) => {
if (!cb) { if (!cb) {
cb = function() {}; cb = function() {};
} }
let result = RunCode.doEval(code); let result = RunCode.doEval(code);
if (saveForConsole && self.ipc.isServer()) { if (forConsoleOnly && self.ipc.isServer()) {
self.commands.push({code}); self.commands.push({code});
self.ipc.broadcast("runcode:newCommand", {code}); self.ipc.broadcast("runcode:newCommand", {code});
} }