Closed ghost91- closed 3 years ago
Hey @tonifisler are you still maintaining this module?
Hey @ghost91-! I am really sorry for the wait, I have a lot of other things on my mind with work these last months and haven't had the time to maintain the module. I will try to transfer it to the League so that it continues living!
Hi ghost91. I've taken over maintenance and development of this module from tonifisler. I believe the issue you've fixed is one I've also fixed. Please try the latest release (0.3.0) and see if that's working for you now. There are many other new features you may enjoy in the new versions too!
Without this fix, the module does not work correctly when used with a system without temp hp. Whenever you would deduct hp from a token, the hit points are actually set to
null
. This is due to the fact that when there are notempHP
, the functiongetNewHP
getsundefined
as the corresponding parameter and tries to calculateNumber(undefined)
, which isNaN
. Then everything else based on this value also becomesNaN
.With this PR, there is a (correct) check if
tempHP
isnull
orundefined
to circumvent this problem.Additionally this adds corresponding test cases.