diff --git a/app/javascript/dashboard/routes/dashboard/settings/account/Index.vue b/app/javascript/dashboard/routes/dashboard/settings/account/Index.vue index 0502ebc1b..55c1e7f03 100644 --- a/app/javascript/dashboard/routes/dashboard/settings/account/Index.vue +++ b/app/javascript/dashboard/routes/dashboard/settings/account/Index.vue @@ -94,8 +94,18 @@ export default { return this.getAccount(this.accountId) || {}; }, }, + watch: { + 'currentAccount.id'(id) { + if (id) { + this.initializeAccount(); + } + }, + }, mounted() { - this.initializeAccount(); + // Account already in the store (navigated in): seed immediately. + if (this.currentAccount.id) { + this.initializeAccount(); + } }, methods: { async initializeAccount() { diff --git a/app/javascript/dashboard/routes/dashboard/settings/account/components/AccountId.vue b/app/javascript/dashboard/routes/dashboard/settings/account/components/AccountId.vue index f02efcdc2..941d79fb1 100644 --- a/app/javascript/dashboard/routes/dashboard/settings/account/components/AccountId.vue +++ b/app/javascript/dashboard/routes/dashboard/settings/account/components/AccountId.vue @@ -8,7 +8,7 @@ import SectionLayout from './SectionLayout.vue'; const { t } = useI18n(); const { currentAccount } = useAccount(); -const getAccountId = computed(() => currentAccount.value.id.toString()); +const getAccountId = computed(() => currentAccount.value?.id?.toString());