This commit is contained in:
alex 2025-03-20 19:33:56 -07:00 committed by GitHub
commit 813cf7e4de
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -153,9 +153,9 @@ export function mergeWithUpdate<T extends { lastUpdateTime?: number }>(
remoteState: T,
) {
const localUpdateTime = localState.lastUpdateTime ?? 0;
const remoteUpdateTime = localState.lastUpdateTime ?? 1;
const remoteUpdateTime = remoteState.lastUpdateTime ?? 1;
if (localUpdateTime < remoteUpdateTime) {
if (localUpdateTime > remoteUpdateTime) {
merge(remoteState, localState);
return { ...remoteState };
} else {