From: Evan You Date: Tue, 13 Aug 2019 15:30:28 +0000 (-0400) Subject: wip: proper handling of value assignment in reactive object X-Git-Tag: v3.0.0-alpha.0~927 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=09141b56fd948229b02b422cebab39f02102bf38;p=thirdparty%2Fvuejs%2Fcore.git wip: proper handling of value assignment in reactive object --- diff --git a/packages/reactivity/src/baseHandlers.ts b/packages/reactivity/src/baseHandlers.ts index cdb9f7b1d0..eaa2b1ed0d 100644 --- a/packages/reactivity/src/baseHandlers.ts +++ b/packages/reactivity/src/baseHandlers.ts @@ -42,7 +42,7 @@ function set( value = toRaw(value) const hadKey = hasOwnProperty.call(target, key) const oldValue = target[key] - if (isValue(oldValue)) { + if (isValue(oldValue) && !isValue(value)) { oldValue.value = value return true }