From 698c9c7bbf3db6fa7530edcbc7fc4d583133fbf1 Mon Sep 17 00:00:00 2001 From: Stefan Zermatten Date: Fri, 4 Mar 2022 12:51:28 +0200 Subject: [PATCH] Fixed adjustment error when trying to adjust a property that isn't set --- .../api/engine/actions/applyPropertyByType/applyAdjustment.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/imports/api/engine/actions/applyPropertyByType/applyAdjustment.js b/app/imports/api/engine/actions/applyPropertyByType/applyAdjustment.js index 1a266fab..b920283b 100644 --- a/app/imports/api/engine/actions/applyPropertyByType/applyAdjustment.js +++ b/app/imports/api/engine/actions/applyPropertyByType/applyAdjustment.js @@ -23,8 +23,8 @@ export default function applyAdjustment(node, { if (damageTargets?.length) { damageTargets.forEach(target => { let stat = target.variables[prop.stat]; - if (!stat) { - log({ + if (!stat?.type) { + log.content.push({ name: 'Error', value: `Could not apply attribute damage, creature does not have \`${prop.stat}\` set` });