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 = {
|
const swcJscOptions = {
|
||||||
target: 'es2021',
|
target: 'es2020',
|
||||||
loose: false,
|
loose: false,
|
||||||
externalHelpers: false,
|
externalHelpers: false,
|
||||||
keepClassNames: true,
|
keepClassNames: true,
|
||||||
|
|
|
@ -31,13 +31,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
eval('const c = 1; let l = 2;');
|
// this is eval'd to allow a parse exception to be thrown without cancelling the entire script
|
||||||
} catch(e) {
|
eval('for(const i of ["a", "b"]); let obj; obj?.test(); obj ??= {};');
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
eval('for(const i of ["a", "b"]);');
|
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue