Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/components/card/TagSelector.vue
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,10 @@
},
methods: {
onSelect(options) {
const addedLabel = options.filter(option => !this.card.labels.includes(option))
const addedLabel = options.filter(option => !this.card.labels.includes(option) && option.id && option.color)
if (addedLabel.length == 0) {

Check failure on line 79 in src/components/card/TagSelector.vue

View workflow job for this annotation

GitHub Actions / NPM lint

Expected '===' and instead saw '=='
return
}
this.$emit('select', addedLabel[0])
},
onRemove(removedLabel) {
Expand Down
1 change: 1 addition & 0 deletions src/store/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
SHARED: 'shared',
}

export default function storeFactory() {

Check warning on line 32 in src/store/main.js

View workflow job for this annotation

GitHub Actions / NPM lint

Missing JSDoc comment
return new Vuex.Store({
modules: {
actions,
Expand Down Expand Up @@ -492,6 +492,7 @@
async addLabelToCurrentBoardAndCard({ dispatch, commit }, { newLabel, card }) {
newLabel.boardId = this.state.currentBoard.id
const label = await apiClient.createLabel(newLabel)
card.labels.push(label)
commit('addLabelToCurrentBoard', label)
dispatch('addLabel', {
card,
Expand Down
Loading