Improve compatibility for max long values in backups

This commit is contained in:
ayumi-signal 2024-12-09 07:30:45 -08:00 committed by GitHub
parent 8b1ceaa1d7
commit 0f66bb13b9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 52 additions and 14 deletions

View file

@ -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);
}