diff --git a/components/Account.vue b/components/Account.vue index 7114752f0..a1355dfa5 100644 --- a/components/Account.vue +++ b/components/Account.vue @@ -325,7 +325,12 @@ await this.$confirm(this.$t('user.deleteAccountConfirm'), 'danger'); const response = await this.$post(`/user/delete`); - this.logout(); + + if (this.impersonationActive) { + this.stopImpersonation(); + } else { + this.logout(); + } }, async setAvatar(source) { const response = await this.$post(`/user/set-avatar`, {source}); diff --git a/routes/admin.vue b/routes/admin.vue index 70a4d3418..d08fbac3b 100644 --- a/routes/admin.vue +++ b/routes/admin.vue @@ -294,7 +294,7 @@ import {deepSet, head} from "../src/helpers"; localeFilter: true, adminsFilter: false, usersShown: false, - adminNotifications: this.$user().adminNotifications ?? 7, + adminNotifications: this.$user() ? (this.$user().adminNotifications ?? 7) : 7, translator, missingTranslations: translator.listMissingTranslations(), abuseReports: undefined,