death-save / combat-utility-belt

Combat Utility Belt module for Foundry Virtual Tabletop
https://deathsave.dev
GNU General Public License v3.0
53 stars 58 forks source link

Having only one custom condition breaks the token HUD #733

Open heatblayze opened 1 year ago

heatblayze commented 1 year ago

Describe the bug Having only one custom condition prints out errors into the console whenever you try to right-click a token, and prevents you from opening the HUD on other tokens.

To Reproduce Steps to reproduce the behavior:

  1. Place some tokens into the tabletop.
  2. Enable Enhanced Conditions in the CUBPuter, then open the Condition Lab.
  3. Change Mapping Type to "Other/Imported".
  4. Add a row, then click Save Mapping.
  5. Right-click tokens. Token HUD does not function correctly.

Expected behavior The token HUD should remain functional and the single condition should be available.

Screenshots (Note: below I am attempting to open the HUD on a different token than the one that it appears on) image

Environment Info:

Additional context Having none is fine, and having more than one is also fine.

Here is the error that appears in the console: foundry.js:747 TypeError: CONFIG.statusEffects.concat is not a function [Detected 1 package: combat-utility-belt] at TokenHUD._getStatusEffectChoices (foundry.js:71459:33) at TokenHUD._getStatusEffectChoices (token.js:199:40) at TokenHUD.getData (foundry.js:71429:30) at TokenHUD._render (foundry.js:5108:29) at TokenHUD._render (foundry.js:68578:17) at TokenHUD.render (foundry.js:5067:10) at TokenHUD.bind (foundry.js:68553:10) at TokenHUD.bind (foundry.js:71376:18) at Token._onClickRight (foundry.js:25580:16) at MouseInteractionManager.callback (foundry.js:27813:45) at MouseInteractionManager._handleClickRight (foundry.js:28090:10) at MouseInteractionManager._handleRightDown (foundry.js:28070:22) at a.emit (index.js:181:35) at r.dispatchEvent (interaction.min.mjs:8:12235) at r.processPointerDown (interaction.min.mjs:8:14214) at t.recursiveFindHit (interaction.min.mjs:8:4098) at t.recursiveFindHit (interaction.min.mjs:8:3882) at t.recursiveFindHit (interaction.min.mjs:8:3882) at t.recursiveFindHit (interaction.min.mjs:8:3882) at t.recursiveFindHit (interaction.min.mjs:8:3882) at t.recursiveFindHit (interaction.min.mjs:8:3882) at t.findHit (interaction.min.mjs:8:4157) at r.processInteractive (interaction.min.mjs:8:12841) at r.onPointerDown (interaction.min.mjs:8:13543)