Check for null child objects in HopObject.list()
This commit is contained in:
parent
c17acaf3a8
commit
4ec134c41f
1 changed files with 3 additions and 1 deletions
|
@ -475,7 +475,9 @@ public class HopObject extends ScriptableObject implements Wrapper {
|
|||
ArrayList a = new ArrayList();
|
||||
|
||||
while ((e != null) && e.hasMoreElements()) {
|
||||
a.add(Context.toObject(e.nextElement(), core.global));
|
||||
Object obj = e.nextElement();
|
||||
if (obj != null)
|
||||
a.add(Context.toObject(obj, core.global));
|
||||
}
|
||||
|
||||
return Context.getCurrentContext().newArray(core.global, a.toArray());
|
||||
|
|
Loading…
Add table
Reference in a new issue