From 87700f3e261ebb3557593ecc42bed41995cb22c1 Mon Sep 17 00:00:00 2001 From: Jonas Karlsson Date: Thu, 28 Nov 2024 19:48:25 +0100 Subject: [PATCH] Fix checkSpecialCases in processCharacterItems The variable it is not available outside of lambda on line 72, should use item here instead. --- scripts/module.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/module.js b/scripts/module.js index 27f9210..54ea070 100644 --- a/scripts/module.js +++ b/scripts/module.js @@ -74,7 +74,7 @@ async function processCharacterItems(character, total, diff, situation) { const relevantItems = character.items.contents.filter(it => checkSpecialCases(it) || isItemRelevant(it, total, diff, situation)); for (const item of relevantItems) { - if (checkSpecialCases(it)) { + if (checkSpecialCases(item)) { //specialCases.push(() => handleSpecialCase(item, total, diff, situation)); specialCases.push(item) await handleSpecialCase(item, total, diff, situation)