Updated required Javascript features for chat.

This commit is contained in:
flash 2024-02-23 18:31:56 +00:00
parent 97c7247016
commit ec7ca22811
2 changed files with 3 additions and 8 deletions

View file

@ -54,7 +54,7 @@ if(!isDebugBuild)
}));
const swcJscOptions = {
target: 'es2021',
target: 'es2020',
loose: false,
externalHelpers: false,
keepClassNames: true,

View file

@ -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;
}