1
0
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:
AkiraFukushima 2018-04-02 22:26:22 +09:00
parent cdea89e8ac
commit e77e05c556

View File

@ -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)