Skip to content

Commit

Permalink
Merge pull request #101 from anatawa12/instanceof-for-parameters-from…
Browse files Browse the repository at this point in the history
…-ScriptEngine-always-false

fix: instanceof for parameters from ScriptEngine always false
  • Loading branch information
anatawa12 authored Jul 2, 2020
2 parents fe7161c + a6e2e47 commit cd94f60
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@ class FIXRhinoScriptEngine : ScriptEngine, Invocable {
val func = (scope[name] as? Function) ?: throw ScriptException("$name is not function")
usingContext { ctx ->
ctx.wrapFactory.isJavaPrimitiveWrap = false
return func.call(ctx, func.parentScope, null, args)
return func.call(ctx, func.parentScope, null, args
.map { ctx.wrapFactory.wrap(ctx, scope, it, null) }
.toTypedArray())
}
}

Expand Down

0 comments on commit cd94f60

Please sign in to comment.