mirror of
https://github.com/ZHANGTIANYAO1/teamspeak-music-bot.git
synced 2026-10-02 04:52:50 +08:00
fix(scope): keep mounting if initial navigation errors (parity with old unconditional mount)
This commit is contained in:
1 parent
593b42830c
commit
355793b7e6
1 file changed
+4
-1
+4
-1
@@ -14,4 +14,7 @@ app.use(router);
|
||||
// Wait for the initial navigation (and the beforeEach guard that reads ?bot)
|
||||
// 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.
|
||||
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'));
|
||||
Reference in new issue
Block a user