fix: only warn when addKeyChainItems does not change the inventory
All checks were successful
Build / build (push) Successful in 44s
Build / build (pull_request) Successful in 1m29s

This commit is contained in:
Sainan 2025-04-11 19:11:17 +02:00
parent 61e168e444
commit 8af4b94afe

View File

@ -232,7 +232,7 @@ export const giveKeyChainItem = async (
const inventoryChanges = await addKeyChainItems(inventory, keyChainInfo); const inventoryChanges = await addKeyChainItems(inventory, keyChainInfo);
if (isEmptyObject(inventoryChanges)) { if (isEmptyObject(inventoryChanges)) {
throw new Error("inventory changes was empty after getting keychain items: should not happen"); logger.warn("inventory changes was empty after getting keychain items: should not happen");
} }
// items were added: update quest stage's i (item was given) // items were added: update quest stage's i (item was given)
updateQuestStage(inventory, keyChainInfo, { i: true }); updateQuestStage(inventory, keyChainInfo, { i: true });