summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/client/app/common/views/components/note-menu.vue15
1 files 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)
}
},