fix(webui): use optional chaining operator for maxLevelCap
	
		
			
	
		
	
	
		
	
		
			All checks were successful
		
		
	
	
		
			
				
	
				Build / build (pull_request) Successful in 5m6s
				
			
		
		
	
	
				
					
				
			
		
			All checks were successful
		
		
	
	Build / build (pull_request) Successful in 5m6s
				
			For items that not in itemMap
This commit is contained in:
		
							parent
							
								
									7d3915fe05
								
							
						
					
					
						commit
						6d2837bee6
					
				@ -832,7 +832,7 @@ function updateInventory() {
 | 
				
			|||||||
                            const td = document.createElement("td");
 | 
					                            const td = document.createElement("td");
 | 
				
			||||||
                            td.classList = "text-end text-nowrap";
 | 
					                            td.classList = "text-end text-nowrap";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                            let maxXP = Math.pow(itemMap[item.ItemType].maxLevelCap ?? 30, 2) * 1000;
 | 
					                            let maxXP = Math.pow(itemMap[item.ItemType]?.maxLevelCap ?? 30, 2) * 1000;
 | 
				
			||||||
                            if (
 | 
					                            if (
 | 
				
			||||||
                                category != "Suits" &&
 | 
					                                category != "Suits" &&
 | 
				
			||||||
                                category != "SpaceSuits" &&
 | 
					                                category != "SpaceSuits" &&
 | 
				
			||||||
@ -859,7 +859,7 @@ function updateInventory() {
 | 
				
			|||||||
                                }
 | 
					                                }
 | 
				
			||||||
                            }
 | 
					                            }
 | 
				
			||||||
                            if (
 | 
					                            if (
 | 
				
			||||||
                                itemMap[item.ItemType].maxLevelCap > 30 &&
 | 
					                                itemMap[item.ItemType]?.maxLevelCap > 30 &&
 | 
				
			||||||
                                (item.Polarized ?? 0) < (itemMap[item.ItemType].maxLevelCap - 30) / 2
 | 
					                                (item.Polarized ?? 0) < (itemMap[item.ItemType].maxLevelCap - 30) / 2
 | 
				
			||||||
                            ) {
 | 
					                            ) {
 | 
				
			||||||
                                const a = document.createElement("a");
 | 
					                                const a = document.createElement("a");
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user