Merge pull request #181 from nonameShijian/PR-Branch
使内置控制台解析代码的行为与浏览器控制台一致,且隔离作用域
This commit is contained in:
commit
a101ac1f84
|
@ -45141,7 +45141,7 @@
|
|||
else{
|
||||
if(!game.observe&&!game.online){
|
||||
try{
|
||||
var result=eval(text2.value);
|
||||
var result = (new Function('_status','lib','game','ui','get','ai',`"use strict";\nreturn ${text2.value}`))(_status,lib,game,ui,get,ai);
|
||||
game.print(result);
|
||||
}
|
||||
catch(e){
|
||||
|
|
Loading…
Reference in New Issue