Skip to content

Commit

Permalink
Merge pull request #27 from ahandleman/main
Browse files Browse the repository at this point in the history
Fixed Severe Attack bug with uninitialized sin sheets
  • Loading branch information
diabeatz96 authored Aug 28, 2024
2 parents 088061c + ac9b731 commit a8fe6da
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
16 changes: 14 additions & 2 deletions module/sheets/actor-sheet.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,21 @@ export class CainActorSheet extends ActorSheet {
relativeTo: this.actor,
}
);
if (this.actor.system.severeAttack || this.actor.system.attack) {
if (this.actor.system.severeAttack) {
context.enrichedDescription = await TextEditor.enrichHTML(
this.actor.system.severeAttack.description || this.actor.system.attack.description,
this.actor.system.severeAttack.description,
{
secrets: this.document.isOwner,
async: true,
rollData: this.actor.getRollData(),
relativeTo: this.actor,
}
);
}

if (this.actor.system.attack) {
context.enrichedDescription = await TextEditor.enrichHTML(
this.actor.system.attack.description,
{
secrets: this.document.isOwner,
async: true,
Expand Down
2 changes: 1 addition & 1 deletion system.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"thumbnail": "systems/cain/assets/cain.png"
}
],
"version": "1.0.22",
"version": "1.0.23",
"compatibility": {
"minimum": 11,
"verified": "12"
Expand Down

0 comments on commit a8fe6da

Please sign in to comment.