fix: conditional in giveKeyChainItem
All checks were successful
Build / build (pull_request) Successful in 1m28s

Using safe navigation now and inverted the condition because i would be false when we have to give items, not true.
This commit is contained in:
Sainan 2025-09-21 14:04:00 +02:00
parent 3d8aa60838
commit 90ee768a39

View File

@ -302,7 +302,7 @@ export const giveKeyChainItem = async (
): Promise<IInventoryChanges> => {
let inventoryChanges: IInventoryChanges = {};
if (questKey.Progress![keyChainInfo.ChainStage].i) {
if (!questKey.Progress?.[keyChainInfo.ChainStage]?.i) {
inventoryChanges = await addKeyChainItems(inventory, keyChainInfo);
if (isEmptyObject(inventoryChanges)) {