From 734a47df7dddd9924adba389679d37da4ad03a03 Mon Sep 17 00:00:00 2001 From: DiTus Date: Wed, 25 Feb 2026 22:46:56 +0100 Subject: [PATCH] Fix temporal dead zone error in filter callback Moved console.log outside filter callback to avoid accessing 'catalog' variable before it was initialized. The log statement was placed inside the filter callback which creates a temporal dead zone for the variable being assigned. --- src/api/dashboard/static/js/ui/indicators-panel-new.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/api/dashboard/static/js/ui/indicators-panel-new.js b/src/api/dashboard/static/js/ui/indicators-panel-new.js index d4843e8..6b075df 100644 --- a/src/api/dashboard/static/js/ui/indicators-panel-new.js +++ b/src/api/dashboard/static/js/ui/indicators-panel-new.js @@ -108,7 +108,6 @@ export function renderIndicatorPanel() { const available = getAvailableIndicators(); const catalog = available.filter(ind => { - console.log("[IndicatorPanel] Total indicators:", available.length, "Filtered to:", catalog.length); if (searchQuery && !ind.name.toLowerCase().includes(searchQuery.toLowerCase())) return false; if (selectedCategory === 'all') return true; if (selectedCategory === 'favorites') return false; @@ -116,6 +115,8 @@ export function renderIndicatorPanel() { return cat === selectedCategory; }); + console.log("[IndicatorPanel] Total indicators:", available.length, "Filtered to:", catalog.length); + const favoriteIds = new Set(userPresets.favorites || []); container.innerHTML = `