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 @@ -135,6 +135,14 @@ exports._destroy = function (remove, deferCleanup) {
135
135
var parent = this . $parent
136
136
if ( parent && ! parent . _isBeingDestroyed ) {
137
137
parent . $children . $remove ( this )
138
+ // unregister ref
139
+ var ref = this . $options . _ref
140
+ if ( ref ) {
141
+ var scope = this . _scope || this . _context
142
+ if ( scope . $refs [ ref ] === this ) {
143
+ scope . $refs [ ref ] = null
144
+ }
145
+ }
138
146
}
139
147
// remove self from owner fragment
140
148
if ( this . _frag ) {
@@ -158,14 +166,6 @@ exports._destroy = function (remove, deferCleanup) {
158
166
while ( i -- ) {
159
167
this . _watchers [ i ] . teardown ( )
160
168
}
161
- // unregister ref
162
- var ref = this . $options . _ref
163
- if ( ref ) {
164
- var scope = this . _scope || this . _context
165
- if ( scope . $ [ ref ] === this ) {
166
- scope . $ [ ref ] = null
167
- }
168
- }
169
169
// remove reference to self on $el
170
170
if ( this . $el ) {
171
171
this . $el . __vue__ = null
You can’t perform that action at this time.
0 commit comments