Skip to content

Commit 39b957a

Browse files
Update src/store-front/src/main.ts
Co-authored-by: Copilot <[email protected]>
1 parent 6984496 commit 39b957a

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/store-front/src/main.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,12 @@ app.use(router)
1313

1414
// Initialize theme before mounting
1515
const { initializeTheme } = useTheme()
16-
initializeTheme().then(() => {
17-
app.mount('#app')
18-
})
16+
initializeTheme()
17+
.then(() => {
18+
app.mount('#app')
19+
})
20+
.catch((error) => {
21+
console.error('Failed to initialize theme:', error)
22+
// Optionally, implement fallback behavior here
23+
app.mount('#app') // Mount the app even if theme initialization fails
24+
})

0 commit comments

Comments
 (0)