From 636be3afd1db459cbc6c36dc3a9e690d87a62e45 Mon Sep 17 00:00:00 2001 From: TheFlow Date: Mon, 27 Oct 2025 19:49:33 +1300 Subject: [PATCH] fix(bi): resolve duplicate variable declaration in audit-analytics.js MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixed SyntaxError: Identifier 'breakdownEl' has already been declared at line 288. Renamed second occurrence from 'breakdownEl' to 'participationBreakdownEl' to avoid variable name collision in same function scope. First use (line 229): cost-avoidance-breakdown Second use (line 288): participation-breakdown 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- public/js/admin/audit-analytics.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/public/js/admin/audit-analytics.js b/public/js/admin/audit-analytics.js index cf427305..5892a1ca 100644 --- a/public/js/admin/audit-analytics.js +++ b/public/js/admin/audit-analytics.js @@ -285,20 +285,20 @@ async function renderBusinessIntelligence() { participationByService[service]++; }); - const breakdownEl = document.getElementById('participation-breakdown'); + const participationBreakdownEl = document.getElementById('participation-breakdown'); const sortedServices = Object.entries(participationByService) .sort((a, b) => b[1] - a[1]) .slice(0, 5); // Top 5 services if (sortedServices.length > 0) { - breakdownEl.innerHTML = sortedServices + participationBreakdownEl.innerHTML = sortedServices .map(([service, count]) => { const percentage = ((count / frameworkBackedDecisions.length) * 100).toFixed(0); return `
${service}: ${count} (${percentage}%)
`; }) .join(''); } else { - breakdownEl.innerHTML = '
No framework guidance data yet
'; + participationBreakdownEl.innerHTML = '
No framework guidance data yet
'; } // Team Comparison (AI vs Human)