Przeglądaj źródła

fix #536 v-ref lost after transition

Evan You 11 lat temu
rodzic
commit
5ad147b96a
1 zmienionych plików z 3 dodań i 1 usunięć
  1. 3 1
      src/directives/ref.js

+ 3 - 1
src/directives/ref.js

@@ -16,7 +16,9 @@ module.exports = {
   },
 
   unbind: function () {
-    delete this.owner.$[this.expression]
+    if (this.owner.$[this.expression] === this.vm) {
+      delete this.owner.$[this.expression]
+    }
   }
   
 }