mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-10-10 03:56:37 +08:00
Compare commits
2 Commits
2384457355
...
7fd143f329
Author | SHA1 | Date | |
---|---|---|---|
|
7fd143f329 | ||
|
357b74da59 |
@ -153,9 +153,9 @@ export function mergeWithUpdate<T extends { lastUpdateTime?: number }>(
|
|||||||
remoteState: T,
|
remoteState: T,
|
||||||
) {
|
) {
|
||||||
const localUpdateTime = localState.lastUpdateTime ?? 0;
|
const localUpdateTime = localState.lastUpdateTime ?? 0;
|
||||||
const remoteUpdateTime = localState.lastUpdateTime ?? 1;
|
const remoteUpdateTime = remoteState.lastUpdateTime ?? 1;
|
||||||
|
|
||||||
if (localUpdateTime < remoteUpdateTime) {
|
if (localUpdateTime > remoteUpdateTime) {
|
||||||
merge(remoteState, localState);
|
merge(remoteState, localState);
|
||||||
return { ...remoteState };
|
return { ...remoteState };
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user