summaryrefslogtreecommitdiff
path: root/src/client/ui/default.sidebar.vue
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/ui/default.sidebar.vue')
-rw-r--r--src/client/ui/default.sidebar.vue6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client/ui/default.sidebar.vue b/src/client/ui/default.sidebar.vue
index b500ab582c..be907aa2a4 100644
--- a/src/client/ui/default.sidebar.vue
+++ b/src/client/ui/default.sidebar.vue
@@ -121,7 +121,7 @@ export default defineComponent({
},
async openAccountMenu(ev) {
- const storedAccounts = getAccounts().filter(x => x.id !== this.$i.id);
+ const storedAccounts = await getAccounts().then(accounts => accounts.filter(x => x.id !== this.$i.id));
const accountsPromise = os.api('users/show', { userIds: storedAccounts.map(x => x.id) });
const accountItemPromises = storedAccounts.map(a => new Promise(res => {
@@ -181,8 +181,8 @@ export default defineComponent({
}, 'closed');
},
- switchAccount(account: any) {
- const storedAccounts = getAccounts();
+ async switchAccount(account: any) {
+ const storedAccounts = await getAccounts();
const token = storedAccounts.find(x => x.id === account.id).token;
this.switchAccountWithToken(token);
},