Fixed bug in last release where unlimited slots were always hidden on hide when full

This commit is contained in:
Stefan Zermatten
2021-01-12 13:51:11 +02:00
parent 85f3881935
commit d63b8c835d

View File

@@ -131,16 +131,25 @@ export default {
], ],
} }
}).map(slot => { }).map(slot => {
slot.children = CreatureProperties.find({ if (
'parent.id': slot._id, !this.showHiddenSlots &&
removed: {$ne: true}, slot.quantityExpected === 0 &&
}, { slot.hideWhenFull
sort: { order: 1 }, ){
}).fetch(); slot.children = []
} else {
slot.children = CreatureProperties.find({
'parent.id': slot._id,
removed: {$ne: true},
}, {
sort: { order: 1 },
}).fetch();
}
return slot; return slot;
}).filter(slot => !( // Hide full and ignored slots }).filter(slot => !( // Hide full and ignored slots
!this.showHiddenSlots && !this.showHiddenSlots &&
slot.hideWhenFull && slot.hideWhenFull &&
slot.quantityExpected > 0 &&
slot.totalFilled >= slot.quantityExpected || slot.totalFilled >= slot.quantityExpected ||
slot.ignored slot.ignored
)); ));