mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-16 05:31:07 +01:00
Null check metadata
This commit is contained in:
parent
0bd423ef52
commit
8f541bce48
1 changed files with 1 additions and 1 deletions
|
|
@ -103,7 +103,7 @@ export default class CostField extends fields.ArrayField {
|
||||||
static calcCosts(costs) {
|
static calcCosts(costs) {
|
||||||
const resources = CostField.getResources.call(this, costs);
|
const resources = CostField.getResources.call(this, costs);
|
||||||
let filteredCosts = 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');
|
filteredCosts = filteredCosts.filter(c => c.key !== 'quantity');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue