From 7b7359fbdc013f64ad6a7d1f98d64c994a8bb926 Mon Sep 17 00:00:00 2001 From: syuilo Date: Tue, 5 Feb 2019 06:12:41 +0900 Subject: [PATCH] [Client] Fix bug --- .../app/common/views/components/note-menu.vue | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/client/app/common/views/components/note-menu.vue b/src/client/app/common/views/components/note-menu.vue index c719ba1407..8e342cfd57 100644 --- a/src/client/app/common/views/components/note-menu.vue +++ b/src/client/app/common/views/components/note-menu.vue @@ -74,12 +74,15 @@ export default Vue.extend({ text: this.$t('pin'), action: () => this.togglePin(true) } : undefined, - null, - this.note.userId == this.$store.state.i.id || this.$store.state.i.isAdmin || this.$store.state.i.isModerator ? { - icon: ['far', 'trash-alt'], - text: this.$t('delete'), - action: this.del - } : undefined].filter(x => x !== undefined) + ...(this.note.userId == this.$store.state.i.id || this.$store.state.i.isAdmin || this.$store.state.i.isModerator ? [ + null, { + icon: ['far', 'trash-alt'], + text: this.$t('delete'), + action: this.del + }] + : [] + )] + .filter(x => x !== undefined) } },