From 71c091e04a30560db08f6998857a1dc9711edb89 Mon Sep 17 00:00:00 2001 From: Oliver-Akins Date: Mon, 25 Mar 2024 22:55:58 -0600 Subject: [PATCH] Fix an issue with the capacity calculation not working on items that don't have a quantity (surprisingly more than expected) --- module/documents/Item/GenericItem.mjs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/module/documents/Item/GenericItem.mjs b/module/documents/Item/GenericItem.mjs index b52ddcd..247d37c 100644 --- a/module/documents/Item/GenericItem.mjs +++ b/module/documents/Item/GenericItem.mjs @@ -7,7 +7,10 @@ export class DotDungeonItem extends Item { get usedCapacity() { let capacity = 0; - if (this.system.uses_inventory_slot && this.system.quantity > 0) { + if ( + this.system.uses_inventory_slot + && (this.system.quantity === undefined || this.system.quantity > 0) + ) { capacity = 1; }; if (this.system.quantity_affects_used_capacity) {