diff --git a/js/app.js b/js/app.js index da57f0a..8b45741 100644 --- a/js/app.js +++ b/js/app.js @@ -2,9 +2,16 @@ * Main Application Module * Entry point for the application, initializes all components */ -document.addEventListener('DOMContentLoaded', () => { +document.addEventListener('DOMContentLoaded', async () => { // Initialize all modules - DataManager.init(); + try { + await DataManager.init(); // Wait for data to be loaded and processed + } catch (error) { + console.error('Failed to initialize DataManager:', error); + // Optionally, display an error message to the user in the UI + // For example, by setting some text in a dedicated error div. + // For now, we'll log and let the app proceed with potentially empty/default data. + } UI.init(); Charts.init();