From 51515b33309bd9921fe568a73dfe632629cce616 Mon Sep 17 00:00:00 2001 From: Thomas Haaf Date: Wed, 20 Nov 2019 15:58:00 +0100 Subject: [PATCH] update method test if instance has been destroyed --- src/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index ea24879..5f14fdb 100644 --- a/src/index.js +++ b/src/index.js @@ -97,7 +97,9 @@ function handleAsyncComputedPropetyChanges (vm, key, pluginOptions, Vue) { Vue.set(vm.$data._asyncComputed, key, { exception: null, update: () => { - watcher(getterOnly(vm.$options.asyncComputed[key]).apply(vm)) + if (!vm._isDestroyed){ + watcher(getterOnly(vm.$options.asyncComputed[key]).apply(vm)) + } } }) setAsyncState(vm, key, 'updating')