forked from OpenWF/SpaceNinjaServer
		
	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: OpenWF/SpaceNinjaServer#2804 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
							
								
									6f8b14fb2d
								
							
						
					
					
						commit
						32c95b6715
					
				@ -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)) {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user