Skip to content

Commit 8090d9e

Browse files
committed
Remove DOMContentLoaded wrapper from document history component import
1 parent a1896fe commit 8090d9e

File tree

1 file changed

+12
-14
lines changed

1 file changed

+12
-14
lines changed

public/views/dashboard.html

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -109,20 +109,18 @@ <h3>Excel Options</h3>
109109

110110
<script>
111111
// Initialize dashboard
112-
document.addEventListener('DOMContentLoaded', () => {
113-
// Import document-history component
114-
import('../js/components/document-history.js')
115-
.then(() => {
116-
console.log('Document history component loaded successfully');
117-
// Initialize the dashboard after the component is loaded
118-
initDashboard();
119-
})
120-
.catch(error => {
121-
console.error('Error loading document history component:', error);
122-
// Still initialize the dashboard even if component fails to load
123-
initDashboard();
124-
});
125-
});
112+
// Import document-history component
113+
import('../js/components/document-history.js')
114+
.then(() => {
115+
console.log('Document history component loaded successfully');
116+
// Initialize the dashboard after the component is loaded
117+
initDashboard();
118+
})
119+
.catch(error => {
120+
console.error('Error loading document history component:', error);
121+
// Still initialize the dashboard even if component fails to load
122+
initDashboard();
123+
});
126124

127125
function initDashboard() {
128126
console.log('Initializing dashboard...');

0 commit comments

Comments
 (0)