Use hasProperty rather than getProperty to avoid creation of lazily evaluated properties.

This commit is contained in:
nboyd%atg.com 2002-04-11 12:54:16 +00:00
parent f689d29f4a
commit 887959238b

View File

@ -1102,8 +1102,7 @@ public class ScriptRuntime {
public static Scriptable getBase(Scriptable scope, String id) {
Scriptable obj = scope;
while (obj != null) {
Object result = ScriptableObject.getProperty(obj, id);
if (result != Scriptable.NOT_FOUND)
if (ScriptableObject.hasProperty(obj, id))
return obj;
obj = obj.getParentScope();
}