This repository was archived by the owner on Mar 4, 2026. It is now read-only.
fix: avoid destructuring undefined timestamps#1575
Merged
schmidt-sebastian merged 2 commits intogoogleapis:masterfrom Aug 2, 2021
Merged
fix: avoid destructuring undefined timestamps#1575schmidt-sebastian merged 2 commits intogoogleapis:masterfrom
schmidt-sebastian merged 2 commits intogoogleapis:masterfrom
Conversation
In `https://github.com/googleapis/nodejs-firestore/blob/master/dev/src/index.ts#L911` we call from proto with a potential undefined instead of an object. This causes an error in `https://github.com/googleapis/nodejs-firestore/blob/master/dev/src/timestamp.ts#L122` where it tries to destructure an undefined value. This problem causes triggers to fail before entering user defined handler.
|
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here with What to do if you already signed the CLAIndividual signers
Corporate signers
ℹ️ Googlers: Go here for more info. |
Author
|
@googlebot I signed it! |
schmidt-sebastian
approved these changes
Aug 2, 2021
Contributor
schmidt-sebastian
left a comment
There was a problem hiding this comment.
Thank you for sending this. We might be able to simplify this if you are keen :)
Co-authored-by: Sebastian Schmidt <mrschmidt@google.com>
Author
|
@schmidt-sebastian Yes I would agree we can simplify. I was not sure what the convention was so I did the verbose way :) Thank you for the review! |
gcf-merge-on-green bot
pushed a commit
that referenced
this pull request
Aug 2, 2021
🤖 I have created a release \*beep\* \*boop\* --- ### [4.14.1](https://www.github.com/googleapis/nodejs-firestore/compare/v4.14.0...v4.14.1) (2021-08-02) ### Bug Fixes * avoid destructuring undefined timestamps ([#1575](https://www.github.com/googleapis/nodejs-firestore/issues/1575)) ([a61a24a](https://www.github.com/googleapis/nodejs-firestore/commit/a61a24a44e70a9693f552a3a39f4579d861fd77f)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In
https://github.com/googleapis/nodejs-firestore/blob/master/dev/src/index.ts#L911we call from proto with a potential undefined instead of an object. This causes an error inhttps://github.com/googleapis/nodejs-firestore/blob/master/dev/src/timestamp.ts#L122where it tries to destructure an undefined value. This problem causes triggers to fail before entering user defined handler.Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
Fixes #1574 🦕