diff --git a/gui/src/main.tsx b/gui/src/main.tsx index 1f8828c7..292e7a1a 100644 --- a/gui/src/main.tsx +++ b/gui/src/main.tsx @@ -47,7 +47,7 @@ export async function main() { merge(params, config.params); const defaults = paramsFromConfig(params); - const state = createStore(persist((set) => ({ + const state = createStore(persist((set) => ({ defaults, history: { images: [], @@ -170,6 +170,13 @@ export async function main() { }, }), { name: 'onnx-web', + partialize: (oldState) => ({ + ...oldState, + history: { + ...oldState.history, + loading: false, + }, + }), storage: createJSONStorage(() => localStorage), }));