From f3e3594e1b7ee387e80f5474c2a66d8c05ecbfe7 Mon Sep 17 00:00:00 2001 From: DrakiaXYZ Date: Sat, 2 Nov 2024 09:37:23 +0000 Subject: [PATCH] Fix moving an item in the fastpanel corrupting profiles (!420) Can be tested by moving a bandage into your hotbar, then moving that same bandage into a different hotbar slot. Restart the client and it'll complain about "Item#" where # is the first slot you moved it into ![image](/attachments/95723854-6b99-4da5-8d08-fd1cd4f592d8) Co-authored-by: DrakiaXYZ <565558+TheDgtl@users.noreply.github.com> Reviewed-on: https://dev.sp-tarkov.com/SPT/Server/pulls/420 Co-authored-by: DrakiaXYZ Co-committed-by: DrakiaXYZ --- project/src/controllers/InventoryController.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/src/controllers/InventoryController.ts b/project/src/controllers/InventoryController.ts index 8595656a..0db762dd 100644 --- a/project/src/controllers/InventoryController.ts +++ b/project/src/controllers/InventoryController.ts @@ -529,7 +529,7 @@ export class InventoryController { for (const index in pmcData.Inventory.fastPanel) { // Find item with existing item in it and remove existing binding, you cant have same item bound to more than 1 slot if (pmcData.Inventory.fastPanel[index] === bindRequest.item) { - pmcData.Inventory.fastPanel[index] = ""; + delete pmcData.Inventory.fastPanel[index]; break; }