Skip to content

Commit

Permalink
Merge pull request #1601 from Azmoria/Fix---having-'attack-action'-in…
Browse files Browse the repository at this point in the history
…-a-journal/statblock-causes-an-error-on-load-of-the-note-

Fix - having 'attack action' in a journal/custom statblock causes an error on load of the note.
  • Loading branch information
Azmoria authored Oct 10, 2023
2 parents 218efdf + 0f2d86a commit 3e73a40
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Journal.js
Original file line number Diff line number Diff line change
Expand Up @@ -890,8 +890,8 @@ class JournalManager{

// Find attack actions
input = input.replace(/(attack) action/gi,
function(m){
let actionId = window.ddbConfigJson.basicActions.filter((d) => d.name.localeCompare(m, undefined, { sensitivity: 'base' }) == 0)[0].id;
function(m, first_bracket_match){
let actionId = window.ddbConfigJson.basicActions.filter((d) => d.name.localeCompare(first_bracket_match, undefined, { sensitivity: 'base' }) == 0)[0].id;
return `<a class="tooltip-hover skill-tooltip" href="/compendium/rules/basic-rules/combat#$attack" aria-haspopup="true" data-tooltip-href="/actions/${actionId}-tooltip" data-tooltip-json-href="/skills/${actionId}/tooltip-json" target="_blank">attack</a> action`
});
// Find cover rules
Expand Down

0 comments on commit 3e73a40

Please sign in to comment.