diff --git a/CHANGELOG b/CHANGELOG index 0cbdd28..870d8ef 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -6,6 +6,7 @@ - Use fly speed for movement when active token is elevated - Add default weapon sets for actors - Shorten "Full Round" action bar label to "Full" +- Fix combat hud crashing when creature has no type or class ## v0.9.3 - Exclude 0 level classes from token description diff --git a/modules/util.mjs b/modules/util.mjs index cc43a7c..47b9bf5 100644 --- a/modules/util.mjs +++ b/modules/util.mjs @@ -1,7 +1,7 @@ export const stripRollFlairs = (formula) => formula.replace(/\[[^\]]*]/g, ""); export function ucFirst(string) { - return string.charAt(0).toUpperCase() + string.slice(1); + return string ? string.charAt(0).toUpperCase() + string.slice(1) : ''; } export function unique(array) {