mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-01-27 23:11:12 -08:00
add 'use strict' to mod scripts
This commit is contained in:
parent
95f7fc1b3b
commit
3bf2e18e85
1 changed files with 1 additions and 1 deletions
|
|
@ -93,7 +93,7 @@ public class Scripts implements Disposable{
|
|||
context.evaluateString(scope, "modName = \"" + currentMod.name + "\"\nscriptName = \"" + file + "\"", "initscript.js", 1, null);
|
||||
}
|
||||
context.evaluateString(scope,
|
||||
wrap ? "(function(){\n" + script + "\n})();" : script,
|
||||
wrap ? "(function(){'use strict'\n" + script + "\n})();" : script,
|
||||
file, 0, null);
|
||||
return true;
|
||||
}catch(Throwable t){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue