File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -71,6 +71,7 @@ EventEmitter {
7171
7272 /// discard object
7373 function discard () {
74+ this .__discardId ()
7475 this .removeAllOnChanged ()
7576
7677 var attached = this .__attachedObjects
@@ -112,12 +113,26 @@ EventEmitter {
112113
113114 /// @private sets id
114115 function _setId (name) {
116+ this .__id = name
115117 var p = this ;
116118 while (p) {
117119 p ._local [name] = this ;
118120 p = p .parent ;
119121 }
120122 }
123+ function __discardId () {
124+ var name = this .__id
125+ if (name === undefined )
126+ return
127+
128+ var p = this
129+ while (p) {
130+ var local = p ._local
131+ if (name in local && local[name] === this )
132+ local[name] = null ;
133+ p = p .parent ;
134+ }
135+ }
121136
122137 ///@private register callback on property's value changed
123138 function onChanged (name, callback, skip) {
You can’t perform that action at this time.
0 commit comments