Skip to content

Commit 15b9b9b

Browse files
authoredJul 4, 2022
fix(reactivity): shallowReactive should not unwrap refs (#12605)
fix #12597
1 parent 8cdd0ac commit 15b9b9b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/core/observer/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ export function defineReactive(
181181
}
182182
}
183183
}
184-
return isRef(value) ? value.value : value
184+
return isRef(value) && !shallow ? value.value : value
185185
},
186186
set: function reactiveSetter(newVal) {
187187
const value = getter ? getter.call(obj) : val

0 commit comments

Comments
 (0)
Please sign in to comment.