File tree 1 file changed +8
-8
lines changed
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) {
133
133
var parent = this . $parent
134
134
if ( parent && ! parent . _isBeingDestroyed ) {
135
135
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
+ }
136
144
}
137
145
// remove self from owner fragment
138
146
if ( this . _frag ) {
@@ -156,14 +164,6 @@ exports._destroy = function (remove, deferCleanup) {
156
164
while ( i -- ) {
157
165
this . _watchers [ i ] . teardown ( )
158
166
}
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
- }
167
167
// remove reference to self on $el
168
168
if ( this . $el ) {
169
169
this . $el . __vue__ = null
You can’t perform that action at this time.
0 commit comments