2002/05/28 17:50:57
[org.ibex.core.git] / src / org / xwt / util / JSObject.java
index 84c7737..ddc7779 100644 (file)
@@ -119,6 +119,10 @@ public class JSObject implements Scriptable {
     public void put(String name, Scriptable start, Object value) {
         if (sealed) return;
         if (name == null || name.equals("")) return;
+
+        if (getPrivately(name, getCurrentFunctionSourceName()) != null)
+            putPrivately(name, value, getCurrentFunctionSourceName());
+
         for(Scriptable cur = Context.enter().currentFunction; cur != null; cur = cur.getParentScope())
             if (cur == this) {
                 putPrivately(name, value, getCurrentFunctionSourceName());