fix: add error handling to changePeriod async function
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 <noreply@anthropic.com>
This commit is contained in:
6
static/vendor/js/analytics.js
vendored
6
static/vendor/js/analytics.js
vendored
@@ -140,7 +140,11 @@ function vendorAnalytics() {
|
|||||||
*/
|
*/
|
||||||
async changePeriod(newPeriod) {
|
async changePeriod(newPeriod) {
|
||||||
this.period = newPeriod;
|
this.period = newPeriod;
|
||||||
await this.loadAllData();
|
try {
|
||||||
|
await this.loadAllData();
|
||||||
|
} catch (error) {
|
||||||
|
vendorAnalyticsLog.error('Failed to change period:', error);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user