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.
This commit is contained in:
DiTus
2026-02-25 22:46:56 +01:00
parent ac44b52b8b
commit 734a47df7d

View File

@ -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 = `