This commit is contained in:
alex
2025-05-02 23:25:15 +08:00
committed by GitHub

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 {