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

Ref not unwrapping other refs set with set on Node #721

Closed
posva opened this issue Jun 1, 2021 · 1 comment · Fixed by #722
Closed

Ref not unwrapping other refs set with set on Node #721

posva opened this issue Jun 1, 2021 · 1 comment · Fixed by #722

Comments

@posva
Copy link
Member

posva commented Jun 1, 2021

It should log an object { old: false, new: true } but it logs { old: false, new: { value: true }}

There is also an index.html file to show the (expected) behavior on a browser

@hyf0
Copy link
Contributor

hyf0 commented Jun 2, 2021

It looks like the root cause is lacking of __ob__ on reactive object in SSR.

// in SSR, there is no __ob__. Mock for reactivity check
if (!hasOwn(observed, '__ob__')) {
def(observed, '__ob__', mockObserver(observed))
}

This code only mock __ob__ on observed itself not include its children. Making it recursive could fix this issue, but I'm not sure it's a good solution.

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

Successfully merging a pull request may close this issue.

2 participants