From 32c95b67154013cd0bc437526671e3697053840a Mon Sep 17 00:00:00 2001 From: Sainan <63328889+Sainan@users.noreply.github.com> Date: Mon, 22 Sep 2025 04:42:54 -0700 Subject: [PATCH] fix: conditional in giveKeyChainItem (#2804) Using safe navigation now and inverted the condition because i would be false when we have to give items, not true. Closes #2803 Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/2804 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com> --- src/services/questService.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/services/questService.ts b/src/services/questService.ts index 8af53db9..a52f9c8d 100644 --- a/src/services/questService.ts +++ b/src/services/questService.ts @@ -302,7 +302,7 @@ export const giveKeyChainItem = async ( ): Promise => { let inventoryChanges: IInventoryChanges = {}; - if (questKey.Progress![keyChainInfo.ChainStage].i) { + if (!questKey.Progress?.[keyChainInfo.ChainStage]?.i) { inventoryChanges = await addKeyChainItems(inventory, keyChainInfo); if (isEmptyObject(inventoryChanges)) {