core icon indicating copy to clipboard operation
core copied to clipboard

fix(reactivity): computed should not be detected as true by isProxy

Open OnlyWick opened this issue 1 year ago • 1 comments

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

OnlyWick avatar Feb 25 '24 14:02 OnlyWick