From 5aeef3437661e2aa2172a7ebd2abb7f3dfd35226 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Wed, 23 Aug 2023 07:49:21 +0200 Subject: [PATCH] fix(comments): Make mounting of the comments sidebar more reliable Signed-off-by: Joas Schilling --- src/App.vue | 6 ++++-- src/Components/Announcement.vue | 6 +++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/App.vue b/src/App.vue index 8cf417e1..8018e5e4 100644 --- a/src/App.vue +++ b/src/App.vue @@ -109,7 +109,7 @@ export default { const activeId = loadState('announcementcenter', 'activeId', 0) if (activeId !== 0) { - await this.onClickAnnouncement(activeId) + this.onClickAnnouncement(activeId) } }, @@ -151,7 +151,9 @@ export default { } await this.commentsView.update(id) - this.commentsView.$mount(this.$refs.sidebar) + this.$nextTick(() => { + this.commentsView.$mount(this.$refs.sidebar) + }) }, }, } diff --git a/src/Components/Announcement.vue b/src/Components/Announcement.vue index 8207bce8..2c9d5c70 100644 --- a/src/Components/Announcement.vue +++ b/src/Components/Announcement.vue @@ -143,15 +143,15 @@ export default { }, groups: { type: Array, - required: true, + default: () => [], }, comments: { type: [Boolean, Number], - required: true, + default: false, }, notifications: { type: Boolean, - required: true, + default: false, }, },