Make sure the array returned by HopObject.list() has its prototype set properly.
This commit is contained in:
parent
76a07955d3
commit
6d7a8eba66
1 changed files with 2 additions and 2 deletions
|
@ -341,7 +341,7 @@ public class HopObject extends ScriptableObject implements Wrapper {
|
|||
*
|
||||
* @return ...
|
||||
*/
|
||||
public NativeArray jsFunction_list() {
|
||||
public Scriptable jsFunction_list() {
|
||||
Enumeration e = node.getSubnodes();
|
||||
ArrayList a = new ArrayList();
|
||||
|
||||
|
@ -349,7 +349,7 @@ public class HopObject extends ScriptableObject implements Wrapper {
|
|||
a.add(e.nextElement());
|
||||
}
|
||||
|
||||
return new NativeArray(a.toArray());
|
||||
return Context.getCurrentContext().newArray(core.global, a.toArray());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue