From 62cf1265f8cd2790cc8154bce807b2b7fdfdb562 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tr=C3=A8sAbhi?= <43380238+tresabhi@users.noreply.github.com> Date: Fri, 26 Jan 2024 07:36:08 -0600 Subject: [PATCH] fix: no negative index --- src/hooks/useAppliedEquipments.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hooks/useAppliedEquipments.ts b/src/hooks/useAppliedEquipments.ts index a65059b76..0342cfe9a 100644 --- a/src/hooks/useAppliedEquipments.ts +++ b/src/hooks/useAppliedEquipments.ts @@ -6,5 +6,5 @@ export function useAppliedEquipments( preset: EquipmentPreset, ) { const flatMatrix = matrix.flat(); - return preset.flat().map((options, index) => options[flatMatrix[index]]); + return preset.flat().map((options, index) => options[flatMatrix[index]] == 1 ? 1 : 0); }