mirror of
https://github.com/status-im/embark-area-51.git
synced 2025-01-11 06:25:57 +00:00
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…
x
Reference in New Issue
Block a user