From 1019e0bcfd80f411940c86bf8333282ea387693b Mon Sep 17 00:00:00 2001 From: Zero King Date: Mon, 12 Apr 2021 14:04:10 +0000 Subject: [PATCH 1/2] Add prop validations in MkAcct (#7439) --- src/client/components/global/acct.vue | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/client/components/global/acct.vue b/src/client/components/global/acct.vue index e3601ff79..835476065 100644 --- a/src/client/components/global/acct.vue +++ b/src/client/components/global/acct.vue @@ -11,7 +11,16 @@ import { toUnicode } from 'punycode/'; import { host } from '@client/config'; export default defineComponent({ - props: ['user', 'detail'], + props: { + user: { + type: Object, + required: true + }, + detail: { + type: Boolean, + default: false + }, + }, data() { return { host: toUnicode(host), From 3c3b4eb2af6943c6ab632d708d93712172d334e0 Mon Sep 17 00:00:00 2001 From: Zero King Date: Mon, 12 Apr 2021 14:07:12 +0000 Subject: [PATCH 2/2] Fix undefined user page title (#7436) --- src/client/pages/user/index.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/src/client/pages/user/index.vue b/src/client/pages/user/index.vue index 773fd4b28..55fb2198e 100644 --- a/src/client/pages/user/index.vue +++ b/src/client/pages/user/index.vue @@ -271,6 +271,7 @@ export default defineComponent({ data() { return { [symbols.PAGE_INFO]: computed(() => this.user ? { + title: this.user.name ? `${this.user.name} (@${this.user.username})` : `@${this.user.username}`, userName: this.user, avatar: this.user, path: `/@${this.user.username}`,