Use getChildElement() rather than getSubnode() to get a child in HopObject.get() -

otherwise, child objects are always accessible via id, even if accessname is specified.
This commit is contained in:
hns 2003-12-03 11:33:56 +00:00
parent 04fd6b05fe
commit 9d6bd72355

View file

@ -304,7 +304,10 @@ public class HopObject extends ScriptableObject implements Wrapper {
n = getFromNode(id.toString()); n = getFromNode(id.toString());
// then try to get child object by id // then try to get child object by id
if (n == null || n == NOT_FOUND) { if (n == null || n == NOT_FOUND) {
n = jsFunction_getById(id); n = node.getChildElement(id.toString());
if (n != null) {
n = Context.toObject(n, core.global);
}
} }
} }