From 6251c06b59b14822679e24d1d145d402cfbc55d0 Mon Sep 17 00:00:00 2001 From: Mario Zechner Date: Mon, 26 Jun 2023 17:13:16 +0200 Subject: [PATCH] Penny category mapper fix. --- stores/penny.js | 1 + 1 file changed, 1 insertion(+) diff --git a/stores/penny.js b/stores/penny.js index 4e8a000..9def41a 100644 --- a/stores/penny.js +++ b/stores/penny.js @@ -82,6 +82,7 @@ exports.initializeCategoryMapping = async () => { exports.mapCategory = (rawItem) => { const categoryPath = rawItem.parentCategories.filter((path) => path.length > 0 && !path[0].name.includes("ngebot"))[0]; + if (!categoryPath) return null; const categoryName = categoryPath.map((path) => path.name).join(" -> "); const category = exports.categoryLookup[categoryName]; if (category) return category.code;