Handle missing option id when grouping cards
This commit is contained in:
parent
fa92e0fbfd
commit
48719f16ce
1 changed files with 9 additions and 5 deletions
|
@ -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)
|
||||||
const cards = this.cards.filter((o) => optionId === o.properties[groupByProperty.id])
|
if (option) {
|
||||||
const group: Group = {
|
const cards = this.cards.filter((o) => optionId === o.properties[groupByProperty.id])
|
||||||
option,
|
const group: Group = {
|
||||||
cards
|
option,
|
||||||
|
cards
|
||||||
|
}
|
||||||
|
groups.push(group)
|
||||||
|
} else {
|
||||||
|
Utils.logError(`groupCardsByOptions: Missing option with id: ${optionId}`)
|
||||||
}
|
}
|
||||||
groups.push(group)
|
|
||||||
} else {
|
} else {
|
||||||
// Empty group
|
// Empty group
|
||||||
const emptyGroupCards = this.cards.filter((o) => {
|
const emptyGroupCards = this.cards.filter((o) => {
|
||||||
|
|
Loading…
Reference in a new issue