Fix application hang by ensuring filter state initialization and adding robustness guards

This commit is contained in:
Christian Vidal Wolf committed 2026-01-27 20:22:58 +01:00
1 parent ef5aeffca9
commit cb9beecaec
2 files changed
+2 -1

No files matched your search

+1
View File
@@ -212,6 +212,7 @@ const App: React.FC = () => {
sku: [],
title: [],
week: [],
stock: [],
});
};
+1 -1
View File
@@ -703,7 +703,7 @@ export const mergeSalesAndAdsData = (
// Helper to check stock filter
const checkStockFilter = (sku: string, filters: string[], stockMap?: Map<string, number>): boolean => {
if (!filters || filters.length === 0) return true;
if (!filters || !Array.isArray(filters) || filters.length === 0) return true;
if (!stockMap) return true;
// Normalize SKU (remove DE/EN) to match stock map