Improve compatibility for max long values in backups
This commit is contained in:
parent
8b1ceaa1d7
commit
0f66bb13b9
4 changed files with 52 additions and 14 deletions
|
@ -24,3 +24,13 @@ export function getTimestampFromLong(value?: Long | null): number {
|
|||
|
||||
return num;
|
||||
}
|
||||
|
||||
export function getTimestampOrUndefinedFromLong(
|
||||
value?: Long | null
|
||||
): number | undefined {
|
||||
if (!value || value.isZero()) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
return getTimestampFromLong(value);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue