Parcourir la source

Fixes: __vfrag__ references prevent GC of Vue objects #2161

Philippe Elsass il y a 10 ans
Parent
commit
fb8775dfca
1 fichiers modifiés avec 3 ajouts et 0 suppressions
  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()
 }