Fixed a lot of cases where we expected a combatant to have an attached actor

This commit is contained in:
WBHarry 2026-01-10 00:02:52 +01:00
parent e6973fabd0
commit b6c0b5b5e4
9 changed files with 41 additions and 17 deletions

View file

@ -316,7 +316,7 @@ const updateActorsRangeDependentEffects = async token => {
CONFIG.DH.SETTINGS.gameSettings.variantRules
).rangeMeasurement;
for (let effect of token.actor.allApplicableEffects()) {
for (let effect of token.actor?.allApplicableEffects() ?? []) {
if (!effect.system.rangeDependence?.enabled) continue;
const { target, range, type } = effect.system.rangeDependence;