From: Evan You Date: Fri, 13 Dec 2019 03:12:45 +0000 (-0500) Subject: fix(runtime-core): ensure $forceUpdate behavior consistency with 2.x X-Git-Tag: v3.0.0-alpha.0~51 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=7431c2e46e4d5c94632a34a6ff44ef0dd4f4ef8b;p=thirdparty%2Fvuejs%2Fcore.git fix(runtime-core): ensure $forceUpdate behavior consistency with 2.x --- diff --git a/packages/runtime-core/src/componentProxy.ts b/packages/runtime-core/src/componentProxy.ts index 02629fdddc..f9c2c8ee86 100644 --- a/packages/runtime-core/src/componentProxy.ts +++ b/packages/runtime-core/src/componentProxy.ts @@ -1,5 +1,5 @@ import { ComponentInternalInstance, Data, Emit } from './component' -import { nextTick } from './scheduler' +import { nextTick, queueJob } from './scheduler' import { instanceWatch } from './apiWatch' import { EMPTY_OBJ, hasOwn, isGloballyWhitelisted } from '@vue/shared' import { @@ -61,7 +61,7 @@ const publicPropertiesMap: Record< $root: i => i.root, $emit: i => i.emit, $options: i => i.type, - $forceUpdate: i => i.update, + $forceUpdate: i => () => queueJob(i.update), $nextTick: () => nextTick, $watch: i => instanceWatch.bind(i) }