Skip to content

Commit 51515b3

Browse files
committed
update method test if instance has been destroyed
1 parent a31e8a4 commit 51515b3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Diff for: src/index.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,9 @@ function handleAsyncComputedPropetyChanges (vm, key, pluginOptions, Vue) {
9797
Vue.set(vm.$data._asyncComputed, key, {
9898
exception: null,
9999
update: () => {
100-
watcher(getterOnly(vm.$options.asyncComputed[key]).apply(vm))
100+
if (!vm._isDestroyed){
101+
watcher(getterOnly(vm.$options.asyncComputed[key]).apply(vm))
102+
}
101103
}
102104
})
103105
setAsyncState(vm, key, 'updating')

0 commit comments

Comments
 (0)