From: Evan You Date: Thu, 18 Oct 2018 22:21:14 +0000 (-0400) Subject: fix: watcher oldValue X-Git-Tag: v3.0.0-alpha.0~1089 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=023f4ef7f41a8e52fa59c813f1a47582aa8aba84;p=thirdparty%2Fvuejs%2Fcore.git fix: watcher oldValue --- diff --git a/packages/core/src/componentWatch.ts b/packages/core/src/componentWatch.ts index 33ceb025a0..183c230b3a 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 } }