This commit is contained in:
alex 2025-08-19 02:53:25 +08:00 committed by GitHub
commit 20d94b9dc2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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 {