Skip to content

Commit

Permalink
fix: label count in issue template (#7555)
Browse files Browse the repository at this point in the history
Signed-off-by: Dakshesh Jain <[email protected]>
  • Loading branch information
dakshesh14 authored Jan 3, 2025
1 parent d18d719 commit 5becc41
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@
if (result.action === 'add') {
void addRef(result.tag)
} else if (result.action === 'remove') {
const filtered = items.filter((it) => it.tag === result.tag._id)
const filtered = items.filter((it) => (it.tag ? it.tag === result.tag._id : it._id === result.tag._id))
if (filtered.length > 0) {
void removeTag(filtered[0]._id)
void removeTag(filtered[0].tag ?? filtered[0]._id)
}
}
}
Expand All @@ -82,7 +82,7 @@
)
}
async function removeTag (id: Ref<TagReference>): Promise<void> {
async function removeTag (id: Ref<TagReference> | Ref<TagElement>): Promise<void> {
dispatch('delete', id)
}
Expand Down

0 comments on commit 5becc41

Please sign in to comment.