瀏覽代碼

fix #536 v-ref lost after transition

Evan You 11 年之前
父節點
當前提交
5ad147b96a
共有 1 個文件被更改,包括 3 次插入1 次删除
  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]
+    }
   }
   
 }