Fixed adjustment error when trying to adjust a property that isn't set
This commit is contained in:
@@ -23,8 +23,8 @@ export default function applyAdjustment(node, {
|
|||||||
if (damageTargets?.length) {
|
if (damageTargets?.length) {
|
||||||
damageTargets.forEach(target => {
|
damageTargets.forEach(target => {
|
||||||
let stat = target.variables[prop.stat];
|
let stat = target.variables[prop.stat];
|
||||||
if (!stat) {
|
if (!stat?.type) {
|
||||||
log({
|
log.content.push({
|
||||||
name: 'Error',
|
name: 'Error',
|
||||||
value: `Could not apply attribute damage, creature does not have \`${prop.stat}\` set`
|
value: `Could not apply attribute damage, creature does not have \`${prop.stat}\` set`
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user