You've already forked focalboard
mirror of
https://github.com/mattermost/focalboard.git
synced 2025-07-15 23:54:29 +02:00
Handle missing option id when grouping cards
This commit is contained in:
@ -189,12 +189,16 @@ class MutableBoardTree implements BoardTree {
|
|||||||
for (const optionId of optionIds) {
|
for (const optionId of optionIds) {
|
||||||
if (optionId) {
|
if (optionId) {
|
||||||
const option = groupByProperty.options.find(o => o.id === optionId)
|
const option = groupByProperty.options.find(o => o.id === optionId)
|
||||||
|
if (option) {
|
||||||
const cards = this.cards.filter((o) => optionId === o.properties[groupByProperty.id])
|
const cards = this.cards.filter((o) => optionId === o.properties[groupByProperty.id])
|
||||||
const group: Group = {
|
const group: Group = {
|
||||||
option,
|
option,
|
||||||
cards
|
cards
|
||||||
}
|
}
|
||||||
groups.push(group)
|
groups.push(group)
|
||||||
|
} else {
|
||||||
|
Utils.logError(`groupCardsByOptions: Missing option with id: ${optionId}`)
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
// Empty group
|
// Empty group
|
||||||
const emptyGroupCards = this.cards.filter((o) => {
|
const emptyGroupCards = this.cards.filter((o) => {
|
||||||
|
Reference in New Issue
Block a user