Skip to content

Error in _prepareSkillsTools when skills deleted from CONFIG #6785

Description

@Larkinabout

If skills are deleted from CONFIG.DND5E.skills, the following error will occur on trying to open an actor sheet when said actor has an item or active effect that adds to actor.system.skills. For example, if the actor is wearing Chainmail with the Stealth Disadvantage property or an actor has an Active Effect adding a check bonus to a skill.

Uncaught (in promise) Error: Failed to render Application "CharacterActorSheet-Actor-JXCLjd3niYecVhwy":
Cannot read properties of undefined (reading 'localeCompare')
[No packages detected]
    at #render (foundry.mjs:27248:13)
    at async #try (foundry.mjs:7169:17)Caused by: TypeError: Cannot read properties of undefined (reading 'localeCompare')
    at base-actor-sheet.mjs:542:32
    at Array.sort (<anonymous>)
    at CharacterActorSheet._prepareSkillsTools (base-actor-sheet.mjs:542:9)
    at CharacterActorSheet._prepareDetailsContext (character-sheet.mjs:362:27)
    at CharacterActorSheet._preparePartContext (character-sheet.mjs:203:35)
    at async CharacterActorSheet._renderHTML (foundry.mjs:28611:29)
    at async #render (foundry.mjs:27239:22)
    at async #try (foundry.mjs:7169:17)

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions