Explorar el Código

check vm.$el presence first

Evan You hace 10 años
padre
commit
ea0f6a1eb3
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  1. 3 1
      src/core/instance/lifecycle.js

+ 3 - 1
src/core/instance/lifecycle.js

@@ -175,7 +175,9 @@ export function lifecycleMixin (Vue: Class<Component>) {
     // turn off all instance listeners.
     vm.$off()
     // remove __vue__ reference
-    vm.$el.__vue__ = null
+    if (vm.$el) {
+      vm.$el.__vue__ = null
+    }
   }
 }