From 0e4fa65d3c9845b1f6a4b2edcef7b5a1203bef63 Mon Sep 17 00:00:00 2001 From: Axel Cocat Date: Tue, 21 Jun 2022 01:54:21 +0200 Subject: [PATCH] fix(character): fix mounts when wielding no weapons --- static/character.hbs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/character.hbs b/static/character.hbs index 02ff1bc..ff5239e 100644 --- a/static/character.hbs +++ b/static/character.hbs @@ -302,7 +302,7 @@ const offHand = charData.equipment.find(e => e.slot === 16); const ranged = charData.equipment.find(e => e.slot === 17); - characterModel.charCustomization.sheathMain = sheathTypes[mainHand.classId][mainHand.subclassId]; + characterModel.charCustomization.sheathMain = mainHand !== undefined ? sheathTypes[mainHand.classId][mainHand.subclassId] : undefined; if (offHand !== undefined) { characterModel.charCustomization.sheathOff = sheathTypes[offHand.classId][offHand.subclassId]; } else if (ranged !== undefined) {