mirror of https://github.com/embarklabs/embark.git
Update name
This commit is contained in:
parent
764a4f863b
commit
95c23f64b3
|
@ -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});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue