mirror of
				https://github.com/blakeblackshear/frigate.git
				synced 2025-10-27 10:52:11 +01:00 
			
		
		
		
	fix nan check in system graphs (#11312)
This commit is contained in:
		
							parent
							
								
									f8523d9ddf
								
							
						
					
					
						commit
						021ffb2437
					
				@ -145,7 +145,7 @@ export function ThresholdBarGraph({
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const getUnitSize = (MB: number) => {
 | 
					const getUnitSize = (MB: number) => {
 | 
				
			||||||
  if (isNaN(MB) || MB < 0) return "Invalid number";
 | 
					  if (MB === null || isNaN(MB) || MB < 0) return "Invalid number";
 | 
				
			||||||
  if (MB < 1024) return `${MB.toFixed(2)} MiB`;
 | 
					  if (MB < 1024) return `${MB.toFixed(2)} MiB`;
 | 
				
			||||||
  if (MB < 1048576) return `${(MB / 1024).toFixed(2)} GiB`;
 | 
					  if (MB < 1048576) return `${(MB / 1024).toFixed(2)} GiB`;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user