Skip to content

fix #4170: Destructing an undefined property now return 'undefined' instead of the whole store #4187

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

Conversation

AnatoleLucet
Copy link

Should resolve #4170.

Has I described here, the idea is to switch from three arguments (being passed to $$invalidate) to one object so we're able to verify if value is passed with the value undefined or if it isn't passed.

Then we can set $$.ctx[i] as undefined if value is given as undefined instead of the whole store.

@AnatoleLucet
Copy link
Author

CI tests are strangely failing. I can't succeed to reproduce the error.

@Conduitry
Copy link
Member

Thanks, but this is a lot of bytes getting added to the compiled components, which I would say is worse than the arguments.length solution.

@Conduitry Conduitry closed this Dec 30, 2019
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 this pull request may close these issues.

Destructuring a store object retuns the whole store if the property does not exist
2 participants