fix: only warn when addKeyChainItems does not change the inventory
This commit is contained in:
parent
61e168e444
commit
8af4b94afe
@ -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 });
|
||||||
|
Loading…
x
Reference in New Issue
Block a user