Skip to content

Update README.md #155

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

Merged
merged 3 commits into from
Jan 27, 2018
Merged

Update README.md #155

merged 3 commits into from
Jan 27, 2018

Conversation

nielsboecker
Copy link

If you delete item['.key'], then in the next line this.$firebaseRefs.items.child(item['.key']) means this.$firebaseRefs.items.child(UNDEFINED)

nielsboecker and others added 3 commits January 27, 2018 23:51
If you `delete item['.key']`, then in the next line `this.$firebaseRefs.items.child(item['.key'])` means `this.$firebaseRefs.items.child(UNDEFINED)`
Copy link
Member

@posva posva left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I realized I wanted to actually copy the item

@nielsboecker
Copy link
Author

@posva You're welcome! Actually I'm still playing around with it, and if I'm not mistaken, it's not even necessary to make a copy. As long as you delete the key, you can assign the same variable.

Also now I know how to copy objects with the spread operator, that's a good one. 👍

@posva posva merged commit d21dee5 into vuejs:master Jan 27, 2018
@posva
Copy link
Member

posva commented Jan 27, 2018

Yes! It's just in case you use the .key somewhere else. I'm glad you learned about the spread operator 😄

posva added a commit that referenced this pull request Jul 10, 2018
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.

2 participants