Skip to content

Commit

Permalink
fix: avoid destructuring undefined timestamps (#1575)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jure Stepišnik committed Aug 2, 2021
1 parent f5bec38 commit a61a24a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dev/src/convert.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export function timestampFromJson(
timestampValue?: string | google.protobuf.ITimestamp,
argumentName?: string
): google.protobuf.ITimestamp | undefined {
let timestampProto: google.protobuf.ITimestamp | undefined;
let timestampProto: google.protobuf.ITimestamp = {};

if (typeof timestampValue === 'string') {
const date = new Date(timestampValue);
Expand Down

1 comment on commit a61a24a

@t0mstah
Copy link

@t0mstah t0mstah commented on a61a24a Aug 2, 2021

Choose a reason for hiding this comment

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

Can you let me know when this is deployed? Seeing errors on our end on firestore Timestamp.now().seconds

Please sign in to comment.