File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed
Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -143,7 +143,9 @@ module.exports = {
143143 // second pass, collect old reused and destroy unused
144144 for ( i = 0 , l = oldVMs . length ; i < l ; i ++ ) {
145145 vm = oldVMs [ i ]
146- item = vm . $data
146+ item = this . arg
147+ ? vm . $data [ this . arg ]
148+ : vm . $data
147149 if ( item . $reused ) {
148150 vm . $reused = true
149151 delete item . $reused
@@ -158,7 +160,9 @@ module.exports = {
158160 vms [ vm . $index ] = vm
159161 } else {
160162 // this one can be destroyed.
161- delete item . __emitter__ [ this . identifier ]
163+ if ( item . __emitter__ ) {
164+ delete item . __emitter__ [ this . identifier ]
165+ }
162166 vm . $destroy ( )
163167 }
164168 }
@@ -229,8 +233,10 @@ module.exports = {
229233 }
230234 } )
231235
232- // attach an ienumerable identifier
233- data . __emitter__ [ this . identifier ] = true
236+ if ( isObject ) {
237+ // attach an ienumerable identifier to the raw data
238+ ( raw || data ) . __emitter__ [ this . identifier ] = true
239+ }
234240
235241 if ( wrap ) {
236242 var self = this ,
You can’t perform that action at this time.
0 commit comments