Skip to content

Pass through Date objects unscathed #165

New issue

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

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

Already on GitHub? # to your account

Merged
merged 1 commit into from
Feb 14, 2018
Merged

Pass through Date objects unscathed #165

merged 1 commit into from
Feb 14, 2018

Conversation

epall
Copy link
Contributor

@epall epall commented Feb 14, 2018

Firestore has native support for timestamps, which show up in JS as Date objects. We need a special case in extractRefs because recursing into a Date and copying its fields doesn't produce a proper copy. Instead we should pass it through the same way we do with more fundamental types, like strings or numbers.

Firestore has native support for timestamps, which show up in JS as `Date` objects. We need a special case in `extractRefs` because recursing into a `Date` and copying its fields doesn't produce a proper copy. Instead we should pass it through the same way we do with more fundamental types, like strings or numbers.
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! Did you came across #164 and thought about doing a PR? it makes me think I could give more visibility by creating issues 😄

@posva posva merged commit 1bd4450 into vuejs:firestore Feb 14, 2018
@posva posva mentioned this pull request Feb 14, 2018
@epall
Copy link
Contributor Author

epall commented Feb 14, 2018

I actually hit the bug myself in a project and didn’t even think to check outstanding Issues. Thanks for the quick merge!

@frankdugan3
Copy link

@posva It would be great if you could push a new alpha release that includes this merge, this issue is biting me right now!

@posva
Copy link
Member

posva commented Feb 24, 2018

Sure, I actually forgot about releasing it!

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

Successfully merging this pull request may close these issues.

3 participants