fix: only warn when addKeyChainItems does not change the inventory (#1578)
Reviewed-on: OpenWF/SpaceNinjaServer#1578 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
This commit is contained in:
		
							parent
							
								
									0c1fa05e9c
								
							
						
					
					
						commit
						525e3067c9
					
				@ -232,7 +232,7 @@ export const giveKeyChainItem = async (
 | 
			
		||||
    const inventoryChanges = await addKeyChainItems(inventory, keyChainInfo);
 | 
			
		||||
 | 
			
		||||
    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)
 | 
			
		||||
    updateQuestStage(inventory, keyChainInfo, { i: true });
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user