Skip to content

Commit 222f7db

Browse files
authored
Merge pull request #43 from pafvel/main
fix: 🐛 removes error when toggling status effect
2 parents e520807 + d956655 commit 222f7db

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/combat/combat.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -427,11 +427,13 @@ export default class YearZeroCombat extends Combat {
427427
}
428428

429429
static async #removeSlowAndFastActions(token) {
430-
return Promise.all([
430+
const effects = [
431431
STATUS_EFFECTS.FAST_ACTION,
432432
STATUS_EFFECTS.SLOW_ACTION,
433433
STATUS_EFFECTS.SINGLE_ACTION,
434-
].map(async effect =>
434+
].filter(action => CONFIG.statusEffects.find(e => e.id === action));
435+
436+
return Promise.all(effects.map(async effect =>
435437
await token.toggleActiveEffect({ id: effect }, { active: false }),
436438
));
437439
}

0 commit comments

Comments
 (0)