From 8fe2508e007391e9f6d1ee390de87f5ac6391877 Mon Sep 17 00:00:00 2001 From: Dev Date: Mon, 29 Jan 2024 09:54:20 +0000 Subject: [PATCH] Improve `addItemToStash()` debug messaging --- project/src/helpers/InventoryHelper.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/src/helpers/InventoryHelper.ts b/project/src/helpers/InventoryHelper.ts index d25c3090..f2d4847a 100644 --- a/project/src/helpers/InventoryHelper.ts +++ b/project/src/helpers/InventoryHelper.ts @@ -127,7 +127,7 @@ export class InventoryHelper output.profileChanges[sessionId].items.new.push(...itemWithModsToAddClone); pmcData.Inventory.items.push(...itemWithModsToAddClone); - this.logger.debug(`Added ${itemWithModsToAddClone[0].upd?.StackObjectsCount} item: ${itemWithModsToAddClone[0]._tpl} with: ${itemWithModsToAddClone.length - 1} mods to inventory`); + this.logger.debug(`Added ${itemWithModsToAddClone[0].upd?.StackObjectsCount ?? 1} item: ${itemWithModsToAddClone[0]._tpl} with: ${itemWithModsToAddClone.length - 1} mods to inventory`); } /**