We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 82da43d commit bf4bdaaCopy full SHA for bf4bdaa
packages/reactivity/src/baseHandlers.ts
@@ -146,13 +146,12 @@ class MutableReactiveHandler extends BaseReactiveHandler {
146
): boolean {
147
let oldValue = target[key]
148
if (!this._isShallow) {
149
- const isOldValueReadonly = isReadonly(oldValue)
150
if (!isShallow(value) && !isReadonly(value)) {
151
oldValue = toRaw(oldValue)
152
value = toRaw(value)
153
}
154
if (!isArray(target) && isRef(oldValue) && !isRef(value)) {
155
- if (isOldValueReadonly) {
+ if (isReadonly(oldValue)) {
156
return false
157
} else {
158
oldValue.value = value
0 commit comments