FIX: Calculation removed wrong parts from restParts

This commit is contained in:
Patrick Haßel 2025-02-03 15:41:42 +01:00
parent c66ae0854d
commit 8f33a16843

View File

@ -147,7 +147,7 @@ export class Calculation {
const newPart = !foundParts.includes(destinationPart); const newPart = !foundParts.includes(destinationPart);
if (newPart) { if (newPart) {
foundParts.push(destinationPart); foundParts.push(destinationPart);
restParts.splice(restParts.indexOf(battery), 1); restParts.splice(restParts.indexOf(destinationPart), 1);
} }
todo.push(destinationJunction); todo.push(destinationJunction);
foundJunctions.push(destinationJunction); foundJunctions.push(destinationJunction);