From 023f4ef7f41a8e52fa59c813f1a47582aa8aba84 Mon Sep 17 00:00:00 2001 From: Evan You Date: Thu, 18 Oct 2018 18:21:14 -0400 Subject: [PATCH] fix: watcher oldValue --- packages/core/src/componentWatch.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/src/componentWatch.ts b/packages/core/src/componentWatch.ts index 33ceb025..183c230b 100644 --- a/packages/core/src/componentWatch.ts +++ b/packages/core/src/componentWatch.ts @@ -61,12 +61,12 @@ export function setupWatcher( const applyCb = () => { const newValue = runner() if (options.deep || newValue !== oldValue) { - oldValue = newValue try { cb.call(instance.$proxy, newValue, oldValue) } catch (e) { handleError(e, instance, ErrorTypes.WATCH_CALLBACK) } + oldValue = newValue } }