check vm.$el presence first

This commit is contained in:
Evan You 2016-06-22 15:28:17 -04:00
parent f0b8f2e290
commit ea0f6a1eb3
1 changed files with 3 additions and 1 deletions

View File

@ -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
}
}
}