File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -133,6 +133,14 @@ exports._destroy = function (remove, deferCleanup) {
133133 var parent = this . $parent
134134 if ( parent && ! parent . _isBeingDestroyed ) {
135135 parent . $children . $remove ( this )
136+ // unregister ref
137+ var ref = this . $options . _ref
138+ if ( ref ) {
139+ var scope = this . _scope || this . _context
140+ if ( scope . $refs [ ref ] === this ) {
141+ scope . $refs [ ref ] = null
142+ }
143+ }
136144 }
137145 // remove self from owner fragment
138146 if ( this . _frag ) {
@@ -156,14 +164,6 @@ exports._destroy = function (remove, deferCleanup) {
156164 while ( i -- ) {
157165 this . _watchers [ i ] . teardown ( )
158166 }
159- // unregister ref
160- var ref = this . $options . _ref
161- if ( ref ) {
162- var scope = this . _scope || this . _context
163- if ( scope . $refs [ ref ] === this ) {
164- scope . $refs [ ref ] = null
165- }
166- }
167167 // remove reference to self on $el
168168 if ( this . $el ) {
169169 this . $el . __vue__ = null
You can’t perform that action at this time.
0 commit comments