Don't work anymore with Version 11.315
Closed this issue · 2 comments
Stain27 commented
SolalDR commented
Hello, and thank you for this magnificent module!
I have the same problem. I believe the problem comes from the _getAbilityList
function (in my case in the dnd5e-actions.js
file).
I've got the following error in my console.
![Capture d’écran 2024-04-09 à 00 39 28](https://private-user-images.githubusercontent.com/14965864/320667393-3b09f146-e549-4404-ab21-2e1f896a5d93.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjUxMDIxMzIsIm5iZiI6MTcyNTEwMTgzMiwicGF0aCI6Ii8xNDk2NTg2NC8zMjA2NjczOTMtM2IwOWYxNDYtZTU0OS00NDA0LWFiMjEtMmUxZjg5NmE1ZDkzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MzElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODMxVDEwNTcxMlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWJkMWFhZmU3ZTkzOTM2NmUzMDRjZDQ1N2VlODRlMTVkMGE0MGE4NmExMDYyMDc0YjIxNjcyNTIyODY3YWQzOWMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.PMwyvtNkj9AIer3Y5G2dGUemufRNOWb7jXKLr7tGQXI)
It seems name
variable is undefined here
_getAbilityList(tokenId, abilities, categoryId, categoryName, macroType) {
let result = this.initializeEmptyCategory(categoryId);
result.name = categoryName;
let abbr = settings.get("abbreviateSkills");
let actions = Object.entries(game.dnd5e.config.abilities).map((e) => {
if (abilities[e[0]].value === 0) return;
let name = abbr ? e[0] : e[1];
name = name.charAt(0).toUpperCase() + name.slice(1);
let encodedValue = [macroType, tokenId, e[0]].join(this.delimiter);
let icon;
if (categoryId === "checks") icon = "";
else icon = this._getProficiencyIcon(abilities[e[0]].proficient);
return { name: name, id: e[0], encodedValue: encodedValue, icon: icon };
});
SolalDR commented
I just fixed the problem locally by modifying this line let name = abbr ? e[0]: e[1].label;
I don't think I know the software enough to create a PR on this issue but I think it's a good base :)