From 68a8d344899f68056c9c51dcbaa623cfbcb39f0c Mon Sep 17 00:00:00 2001 From: Dev Date: Tue, 10 Oct 2023 22:37:38 +0100 Subject: [PATCH] Protect against a missing upd object inside `changeItemStack()` --- project/src/helpers/QuestHelper.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/project/src/helpers/QuestHelper.ts b/project/src/helpers/QuestHelper.ts index 3e34fa88..1b5c4c16 100644 --- a/project/src/helpers/QuestHelper.ts +++ b/project/src/helpers/QuestHelper.ts @@ -501,6 +501,10 @@ export class QuestHelper if (newStackSize > 0) { const item = pmcData.Inventory.items[inventoryItemIndex]; + if (!item.upd) + { + item.upd = {}; + } item.upd.StackObjectsCount = newStackSize; this.addItemStackSizeChangeIntoEventResponse(output, sessionID, item);