Skip to content
This repository has been archived by the owner on Aug 26, 2021. It is now read-only.

Can't toggle rage on a token without the Barbarian class #9

Closed
illandril opened this issue Feb 3, 2021 · 1 comment
Closed

Can't toggle rage on a token without the Barbarian class #9

illandril opened this issue Feb 3, 2021 · 1 comment
Labels
bug Something isn't working
Milestone

Comments

@illandril
Copy link

An uncaught TypeError is thrown trying to check to see if the actor is a "Path of the Totem Warrior" or not.

effects.js:241 Uncaught TypeError: Cannot read property 'data' of undefined
    at Function.rage (effects.js:241)
    at Function.getEffectForActor (effects.js:53)
    at HTMLLIElement.handleEffectToggleEvent (effects.js:29)
240        const classItem = actor.data.items.filter(isBarbarianClassItem)[0];
241        if(classItem.data.subclass === "Path of the Totem Warrior") {

Note: I don't know if anyone would ever actually want to do this or not in practice - I only noticed it because I was clicking on random effects testing my mod (re: illandril/FoundryVTT-token-hud-scale#10).

@kszczepanskidev
Copy link
Owner

Thanks for checking it out, it checks if actor have Barbarian class on the sheet, but it was missing stopping with warning message

@kszczepanskidev kszczepanskidev added the bug Something isn't working label Feb 3, 2021
@kszczepanskidev kszczepanskidev added this to the 1.2.6 milestone Feb 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants