Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[reactivity]toRaw behaves inconsistently for objects constructed from prototypes of different reactive object types #6268

Open
NoraH1to opened this issue Jul 13, 2022 · 0 comments · May be fixed by #6355

Comments

@NoraH1to
Copy link

Vue version

3.2.37

Link to minimal reproduction

https://sfc.vuejs.org/#eNp1kstuwyAQRX9lxMaO5MI+TSpFXVeV2kU3bAiauKTmISCxIsv/XogfcaJ2ZWa49zJHno7snKPnE5I12QTplYsQMJ7cCzdKO+sjdOBRyKjOWEG0H6KFHg7eaiiSrXjmhhvGQFqtrYF4cQgl0prC+/6IMlY778VlxY20JkSwXtXKiOZ1kG/n7LLrVylrUI1h2zGDyqSKWN6bb3Iv2jnvOmE5BEwK2yBtbF0WQ7uo5ge2aYDJnNUjStOkV9U9zptw1SfG6gvFTz7nb6r/IJvdCzqDbU4oV0vIhfA/0EnyALtwTsCPygX0dHUFv1kn+KVzw4YlSL8/FRG1a9JAqdqwuSAVGVbjSQtHj8GatDwdNwB8vAicrOHayb20Jrnm5DtGF9aMhYPMK3cM1PqapRP1JxOVRopBP+29bQP6FMxJjui56Un/C0YJ8vM=

Steps to reproduce

Open the page and look at the console

What is expected?

common === rawCommon should be true

collection === rawCollection should be true

What is actually happening?

common === rawCommon is true

but collection === rawCollection is false

System Info

System:
    OS: Windows 11 22000.675
    CPU: (20) x64 12th Gen Intel(R) Core(TM) i7-12700KF
    Memory: 15.89 GB / 31.86 GB
Binaries:
    Node: 16.15.1 - C:\Program Files\nodejs\node.EXE
    Yarn: 1.22.19 - C:\Program Files\nodejs\yarn.CMD
    npm: 8.11.0 - C:\Program Files\nodejs\npm.CMD
Browsers:
    Chrome: 103 Chromium (103.0.5060.114)
    Internet Explorer: 11.0.22000.120

Any additional comments?

This commit make common === rawCommon is true

Maybe missing the handling of the collection type?

I found that this case is not handled in reactivity/src/collectionHandlers.ts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants