fix(product): 透传产品树AppData保存失败
This commit is contained in:
@@ -110,7 +110,7 @@ export const useProductStore = create<ProductState>((set, get) => ({
|
||||
const overview = await api.get<ProductOverview[]>('/products/overview');
|
||||
set({ overview, loading: false, overviewLoaded: true });
|
||||
if (shouldPersistRemoteOverview(overview)) {
|
||||
saveStoredOverview(overview);
|
||||
void saveStoredOverview(overview).catch(() => {});
|
||||
}
|
||||
} catch {
|
||||
set({ overview: MOCK_OVERVIEW, error: null, loading: false, overviewLoaded: true });
|
||||
@@ -328,7 +328,7 @@ export const useProductStore = create<ProductState>((set, get) => ({
|
||||
}));
|
||||
|
||||
async function saveStoredOverview(data: ProductOverview[]) {
|
||||
await saveServerData('products-overview', data).catch(() => {});
|
||||
await saveServerData('products-overview', data);
|
||||
}
|
||||
|
||||
async function loadStoredOverview(): Promise<ProductOverview[] | null> {
|
||||
|
||||
Reference in New Issue
Block a user