From 8f541bce48ed3d7f1a5b01f9c0a5061c1f52c419 Mon Sep 17 00:00:00 2001 From: Chris Ryan Date: Wed, 3 Sep 2025 22:09:00 +1000 Subject: [PATCH] Null check metadata --- module/data/fields/action/costField.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/data/fields/action/costField.mjs b/module/data/fields/action/costField.mjs index e8ecf79b..4388705b 100644 --- a/module/data/fields/action/costField.mjs +++ b/module/data/fields/action/costField.mjs @@ -103,7 +103,7 @@ export default class CostField extends fields.ArrayField { static calcCosts(costs) { const resources = CostField.getResources.call(this, costs); let filteredCosts = costs; - if (this.parent.metadata.isQuantifiable && this.parent.consumeOnUse === false) { + if (this.parent?.metadata.isQuantifiable && this.parent.consumeOnUse === false) { filteredCosts = filteredCosts.filter(c => c.key !== 'quantity'); }