diff --git a/src/module/powers/warriorsGift.js b/src/module/powers/warriorsGift.js index 03e589d..c3e6e27 100644 --- a/src/module/powers/warriorsGift.js +++ b/src/module/powers/warriorsGift.js @@ -6,7 +6,13 @@ export class WarriorsGiftEffect extends PowerEffect { constructor(token, targets) { super(token, targets); const template = game.actors.getName('warriors-edge_template'); - this.edges = template.items.filter((i) => i.type === 'edge').map((i) => template.getEmbeddedDocument('Item', i.id)); + if (template) { + this.edges = template.items + .filter((i) => i.type === 'edge') + .map((i) => template.getEmbeddedDocument('Item', i.id)); + } else { + this.edges = []; + } } get name() {