From d63b8c835d98cd531fe376806679c7989f97aeb8 Mon Sep 17 00:00:00 2001 From: Stefan Zermatten Date: Tue, 12 Jan 2021 13:51:11 +0200 Subject: [PATCH] Fixed bug in last release where unlimited slots were always hidden on hide when full --- app/imports/ui/creature/slots/Slots.vue | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/app/imports/ui/creature/slots/Slots.vue b/app/imports/ui/creature/slots/Slots.vue index c4e78775..bf3b98ed 100644 --- a/app/imports/ui/creature/slots/Slots.vue +++ b/app/imports/ui/creature/slots/Slots.vue @@ -131,16 +131,25 @@ export default { ], } }).map(slot => { - slot.children = CreatureProperties.find({ - 'parent.id': slot._id, - removed: {$ne: true}, - }, { - sort: { order: 1 }, - }).fetch(); + if ( + !this.showHiddenSlots && + slot.quantityExpected === 0 && + slot.hideWhenFull + ){ + slot.children = [] + } else { + slot.children = CreatureProperties.find({ + 'parent.id': slot._id, + removed: {$ne: true}, + }, { + sort: { order: 1 }, + }).fetch(); + } return slot; }).filter(slot => !( // Hide full and ignored slots !this.showHiddenSlots && slot.hideWhenFull && + slot.quantityExpected > 0 && slot.totalFilled >= slot.quantityExpected || slot.ignored ));