Skip to content

Commit

Permalink
JSLoader: Actually fix eval erroring instead of outputting the text o…
Browse files Browse the repository at this point in the history
…f the error
  • Loading branch information
camnwalter committed Mar 26, 2024
1 parent 976a274 commit 5c35cb9
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ object JSLoader {
}
}

fun eval(code: String): String {
fun eval(code: String): String? {
return wrapInContext {
ScriptRuntime.doTopCall(
{ cx, scope, thisObj, args ->
Expand All @@ -170,7 +170,7 @@ object JSLoader {
evalScope,
emptyArray(),
true,
) as String
) as? String
}
}

Expand Down

0 comments on commit 5c35cb9

Please sign in to comment.