mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-14 04:31:07 +01:00
Fixed so armor preUpdate doesn't fail if no system changes are made
This commit is contained in:
parent
a26e6aface
commit
52f940bb51
1 changed files with 1 additions and 1 deletions
|
|
@ -60,7 +60,7 @@ export default class DHArmor extends AttachableItem {
|
||||||
const allowed = await super._preUpdate(changes, options, user);
|
const allowed = await super._preUpdate(changes, options, user);
|
||||||
if (allowed === false) return false;
|
if (allowed === false) return false;
|
||||||
|
|
||||||
if (changes.system.armorFeatures) {
|
if (changes.system?.armorFeatures) {
|
||||||
const removed = this.armorFeatures.filter(x => !changes.system.armorFeatures.includes(x));
|
const removed = this.armorFeatures.filter(x => !changes.system.armorFeatures.includes(x));
|
||||||
const added = changes.system.armorFeatures.filter(x => !this.armorFeatures.includes(x));
|
const added = changes.system.armorFeatures.filter(x => !this.armorFeatures.includes(x));
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue