core
core copied to clipboard
fix(reactivity): computed should not be detected as true by isProxy
Regarding the changes to the isProxy
function, I think using ReactiveFlags.RAW
for the check is sufficient, and there is no need to call the other two functions. This is because after being proxied by the reactive
methods, there will always be a ReactiveFlags.RAW
flag, and there is also a special case where computed
itself is created using ComputedRefImpl
, so using isProxy
to check will work.
https://github.com/vuejs/core/blob/89de26cdcdddef8096417ea494de113399629d5b/packages/reactivity/src/computed.ts#L68