Merge pull request #181 from nonameShijian/PR-Branch

使内置控制台解析代码的行为与浏览器控制台一致,且隔离作用域
This commit is contained in:
Spmario233 2023-07-29 23:23:15 +08:00 committed by GitHub
commit a101ac1f84
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -45141,7 +45141,7 @@
else{ else{
if(!game.observe&&!game.online){ if(!game.observe&&!game.online){
try{ 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); game.print(result);
} }
catch(e){ catch(e){