From d155ee6b1aaf0dcf525efc6600fa3509ef6054e2 Mon Sep 17 00:00:00 2001 From: hns Date: Wed, 3 Dec 2003 10:14:35 +0000 Subject: [PATCH] do checkNode() as first thing in HopObject.list() --- src/helma/scripting/rhino/HopObject.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/helma/scripting/rhino/HopObject.java b/src/helma/scripting/rhino/HopObject.java index 8523572d..e8005f88 100644 --- a/src/helma/scripting/rhino/HopObject.java +++ b/src/helma/scripting/rhino/HopObject.java @@ -440,11 +440,11 @@ public class HopObject extends ScriptableObject implements Wrapper { * @return ... */ public Scriptable jsFunction_list() { + checkNode(); + Enumeration e = node.getSubnodes(); ArrayList a = new ArrayList(); - checkNode(); - while ((e != null) && e.hasMoreElements()) { a.add(Context.toObject(e.nextElement(), core.global)); }