From 566fd1d30f5a6c5f07220c3187735c263130e722 Mon Sep 17 00:00:00 2001 From: Patric Stout Date: Sun, 3 Mar 2024 16:10:43 +0100 Subject: [PATCH] fix(charge): adding charges duplicates slot for which charge is added (#68) This causes everything to become slower and slower. --- src/ShipSnapshotProvider/ShipSnapshotProvider.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ShipSnapshotProvider/ShipSnapshotProvider.tsx b/src/ShipSnapshotProvider/ShipSnapshotProvider.tsx index fde5d7f..5bcd6fd 100644 --- a/src/ShipSnapshotProvider/ShipSnapshotProvider.tsx +++ b/src/ShipSnapshotProvider/ShipSnapshotProvider.tsx @@ -233,6 +233,7 @@ export const ShipSnapshotProvider = (props: ShipSnapshotProps) => { )?.value; if (moduleChargeSize !== undefined && moduleChargeSize !== chargeSize) { newItems.push(item); + continue; } /* Check if the charge fits in this module; if so, assign it. */