mirror of
https://github.com/h3poteto/whalebird-desktop
synced 2025-02-03 10:47:34 +01:00
refs #100 Refresh default active account when load global header
This commit is contained in:
parent
cdea89e8ac
commit
e77e05c556
@ -44,6 +44,7 @@ export default {
|
||||
try {
|
||||
const accounts = await this.$store.dispatch('GlobalHeader/listAccounts')
|
||||
if (this.$route.params.id === undefined) {
|
||||
this.$store.dispatch('GlobalHeader/schmearMenu', accounts[0]._id)
|
||||
return this.$router.push({ path: `/${accounts[0]._id}/home` })
|
||||
} else {
|
||||
return this.$store.dispatch('GlobalHeader/schmearMenu', this.$route.params.id)
|
||||
|
Loading…
x
Reference in New Issue
Block a user