[Client] Fix bug

This commit is contained in:
syuilo 2019-02-05 06:12:41 +09:00
parent 70c01c52a8
commit 7b7359fbdc
No known key found for this signature in database
GPG key ID: BDC4C49D06AB9D69

View file

@ -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)
}
},