diff --git a/rhino/src/main/java/org/mozilla/javascript/ScriptRuntime.java b/rhino/src/main/java/org/mozilla/javascript/ScriptRuntime.java index d13907e2f..e1ab02678 100644 --- a/rhino/src/main/java/org/mozilla/javascript/ScriptRuntime.java +++ b/rhino/src/main/java/org/mozilla/javascript/ScriptRuntime.java @@ -2853,7 +2853,7 @@ public class ScriptRuntime { } static Object[] getApplyArguments(Context cx, Object arg1) { - if (arg1 == null || Undefined.isUndefined(arg1)) { + if (arg1 == null || Undefined.isUndefined(arg1) || arg1 == ScriptRuntime.emptyArgs) { return ScriptRuntime.emptyArgs; } else if (arg1 instanceof Scriptable && isArrayLike((Scriptable) arg1)) { return cx.getElements((Scriptable) arg1);