fix(common/scripting): set languageVersion to ES6

This commit is contained in:
rhunk 2024-02-01 00:08:38 +01:00
parent d8d4f4926d
commit ff43a557d7

View File

@ -9,6 +9,7 @@ import org.mozilla.javascript.Wrapper
fun contextScope(f: Context.() -> Any?): Any? {
val context = Context.enter()
context.optimizationLevel = -1
context.languageVersion = Context.VERSION_ES6
try {
return context.f().let {
if (it is Wrapper) {