Skip to content

Commit

Permalink
fix(weex): make sure the document destroyed even the instance.app is …
Browse files Browse the repository at this point in the history
…empty
  • Loading branch information
Hanks10100 committed Sep 25, 2017
1 parent 1e407a6 commit dbebd36
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/platforms/weex/entry-framework.js
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,12 @@ export function createInstance (
export function destroyInstance (instanceId) {
const instance = instances[instanceId]
if (instance && instance.app instanceof instance.Vue) {
instance.app.$destroy()
instance.document.destroy()
try {
instance.app.$destroy()
} catch (e) {
} finally {
instance.document.destroy()
}
}
delete instances[instanceId]
}
Expand Down

0 comments on commit dbebd36

Please sign in to comment.