Fixed adjustment error when trying to adjust a property that isn't set

This commit is contained in:
Stefan Zermatten
2022-03-04 12:51:28 +02:00
parent 7544243640
commit 698c9c7bbf

View File

@@ -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`
});