fix(scope): keep mounting if initial navigation errors (parity with old unconditional mount)

This commit is contained in:
saopig1 committed 2026-05-30 15:25:20 +08:00
1 parent 593b42830c
commit 355793b7e6
1 file changed
+4 -1
+4 -1
View File
@@ -14,4 +14,7 @@ app.use(router);
// Wait for the initial navigation (and the beforeEach guard that reads ?bot) // Wait for the initial navigation (and the beforeEach guard that reads ?bot)
// to fully resolve before mounting, so the reactive route query is populated // to fully resolve before mounting, so the reactive route query is populated
// when App.onMounted runs and the dedicated-bot scope locks the right bot. // when App.onMounted runs and the dedicated-bot scope locks the right bot.
router.isReady().then(() => app.mount('#app')); // .catch keeps parity with the old unconditional mount: if the initial
// navigation errors (e.g. a transient network failure in the auth guard),
// still render the shell rather than leaving a blank page.
router.isReady().catch(() => {}).then(() => app.mount('#app'));