Skip to content

Commit

Permalink
fix(reactivity): shallowReactive should not unwrap refs (#12605)
Browse files Browse the repository at this point in the history
fix #12597
  • Loading branch information
deftliang authored Jul 4, 2022
1 parent 8cdd0ac commit 15b9b9b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/core/observer/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ export function defineReactive(
}
}
}
return isRef(value) ? value.value : value
return isRef(value) && !shallow ? value.value : value
},
set: function reactiveSetter(newVal) {
const value = getter ? getter.call(obj) : val
Expand Down

0 comments on commit 15b9b9b

Please sign in to comment.