From 4bc6b4a80ba33d8e7197bfb70df92ab05bc032f5 Mon Sep 17 00:00:00 2001 From: Lucian Holland Date: Sun, 1 May 2016 10:36:16 +0200 Subject: [PATCH] Fix legendary action count parsing. --- 5eShaped/precompiled/components/sheetWorkers.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/5eShaped/precompiled/components/sheetWorkers.js b/5eShaped/precompiled/components/sheetWorkers.js index 8c6dc6f319..8b9fedf160 100644 --- a/5eShaped/precompiled/components/sheetWorkers.js +++ b/5eShaped/precompiled/components/sheetWorkers.js @@ -4035,9 +4035,9 @@ const parseSRDContentSection = (content, finalSetAttrs, title, name) => { } if (exists(section)) { if (name === 'legendaryaction') { - const legendaryActionsMatch = content.match(/Can take (\d+) Legendary Actions/gi); + const legendaryActionsMatch = section.match(/Can take (\d+) Legendary Actions/i); if (legendaryActionsMatch && legendaryActionsMatch[1]) { - finalSetAttrs.legendary_action_amount = legendaryActionAmount[1]; + finalSetAttrs.legendary_action_amount = legendaryActionsMatch[1]; } }