Skip to content

Commit a61a24a

Browse files
author
Jure Stepišnik
authored
fix: avoid destructuring undefined timestamps (#1575)
1 parent f5bec38 commit a61a24a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dev/src/convert.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export function timestampFromJson(
4949
timestampValue?: string | google.protobuf.ITimestamp,
5050
argumentName?: string
5151
): google.protobuf.ITimestamp | undefined {
52-
let timestampProto: google.protobuf.ITimestamp | undefined;
52+
let timestampProto: google.protobuf.ITimestamp = {};
5353

5454
if (typeof timestampValue === 'string') {
5555
const date = new Date(timestampValue);

0 commit comments

Comments
 (0)