From 0f2d86a7305b2d9b512811868c62619f7aae254a Mon Sep 17 00:00:00 2001 From: Azmoria <65363489+Azmoria@users.noreply.github.com> Date: Mon, 9 Oct 2023 21:30:08 -0400 Subject: [PATCH] Fix - having 'attack action' in a journal/custom statblock causes an error on load of the note. --- Journal.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Journal.js b/Journal.js index 892c2b81b..698c2441d 100644 --- a/Journal.js +++ b/Journal.js @@ -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 `attack action` }); // Find cover rules