Jelajahi Sumber

Fixes: __vfrag__ references prevent GC of Vue objects #2161

Philippe Elsass 10 tahun lalu
induk
melakukan
fb8775dfca
1 mengubah file dengan 3 tambahan dan 0 penghapusan
  1. 3 0
      src/fragment/fragment.js

+ 3 - 0
src/fragment/fragment.js

@@ -181,6 +181,9 @@ Fragment.prototype.destroy = function () {
   if (this.parentFrag) {
     this.parentFrag.childFrags.$remove(this)
   }
+  if (this.node) {
+    this.node.__vfrag__ = null
+  }
   this.unlink()
 }