Przeglądaj źródła

fix cleanup error when instance has no data

Evan You 10 lat temu
rodzic
commit
9476ce9d12
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      src/instance/internal/lifecycle.js

+ 1 - 1
src/instance/internal/lifecycle.js

@@ -244,7 +244,7 @@ export default function (Vue) {
     }
     // remove reference from data ob
     // frozen object may not have observer.
-    if (this._data.__ob__) {
+    if (this._data && this._data.__ob__) {
       this._data.__ob__.removeVm(this)
     }
     // Clean up references to private properties and other