From ea0218746f77f931c87b96d1e0bb0bef3e9eb073 Mon Sep 17 00:00:00 2001 From: Samir Boulahtit Date: Thu, 1 Jan 2026 20:36:20 +0100 Subject: [PATCH] fix: add error handling to changePeriod async function MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Wrap await call in try/catch to satisfy JS-006 architecture rule. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- static/vendor/js/analytics.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/static/vendor/js/analytics.js b/static/vendor/js/analytics.js index b94fe3c9..cadc1aec 100644 --- a/static/vendor/js/analytics.js +++ b/static/vendor/js/analytics.js @@ -140,7 +140,11 @@ function vendorAnalytics() { */ async changePeriod(newPeriod) { this.period = newPeriod; - await this.loadAllData(); + try { + await this.loadAllData(); + } catch (error) { + vendorAnalyticsLog.error('Failed to change period:', error); + } }, /**