Updated required Javascript features for chat.
This commit is contained in:
parent
97c7247016
commit
ec7ca22811
2 changed files with 3 additions and 8 deletions
2
build.js
2
build.js
|
@ -54,7 +54,7 @@ if(!isDebugBuild)
|
|||
}));
|
||||
|
||||
const swcJscOptions = {
|
||||
target: 'es2021',
|
||||
target: 'es2020',
|
||||
loose: false,
|
||||
externalHelpers: false,
|
||||
keepClassNames: true,
|
||||
|
|
|
@ -31,13 +31,8 @@
|
|||
}
|
||||
|
||||
try {
|
||||
eval('const c = 1; let l = 2;');
|
||||
} catch(e) {
|
||||
return false;
|
||||
}
|
||||
|
||||
try {
|
||||
eval('for(const i of ["a", "b"]);');
|
||||
// this is eval'd to allow a parse exception to be thrown without cancelling the entire script
|
||||
eval('for(const i of ["a", "b"]); let obj; obj?.test(); obj ??= {};');
|
||||
} catch(e) {
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue