From 2d127f1653fb2e1810575c339f704930d7498f0a Mon Sep 17 00:00:00 2001 From: johndav2 <44272061+johndav2@users.noreply.github.com> Date: Fri, 5 Aug 2022 12:24:40 -0700 Subject: [PATCH] v1.8.7 Bug Fixes When Targeted limiter is added to Massive Damage, now shows if an enemy has not been defined. The function setCombatRoll() no longer crashes if a maneuver is not selected. Previously this would cause some attributes not to activate until a maneuver was selected. --- BESM4eExtras/BESM4eExtras.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/BESM4eExtras/BESM4eExtras.html b/BESM4eExtras/BESM4eExtras.html index a8bd346343..b270008820 100644 --- a/BESM4eExtras/BESM4eExtras.html +++ b/BESM4eExtras/BESM4eExtras.html @@ -10119,7 +10119,7 @@ function setMassiveDamageCharacteristic(debug, timer, value, rowID, level, setObj) { const targeted = getIsTargeted(debug, timer, value, rowID, setObj); const focused = getCustomizationValue(debug, timer, value, rowID, 'rank', 'focuseddamage'); - const enemy = value[`repeating_attr_${rowID}_enemy`]; + const enemy = value[`repeating_attr_${rowID}_enemy`] || ''; const weaponclass = value[`repeating_attr_${rowID}_weaponclass`]; let characteristic = `DM +${level}`; if (targeted) characteristic = characteristic + ` vs. ${enemy}`; @@ -13111,6 +13111,7 @@ const maneuverSelected =_.isString(setObj.static_weapon_maneuver_name) ? setObj.static_weapon_maneuver_name : value.static_weapon_maneuver_name; + if (maneuverSelected === undefined) return; const maneuverTitleCase = capital(maneuverSelected); const maneuver = removeWhiteSpace(maneuverSelected); const acv =