mirror of
				https://github.com/karl0ss/homepage.git
				synced 2025-11-04 08:20:58 +00:00 
			
		
		
		
	Fix jobStats potentially accessed before instantiated
This commit is contained in:
		
							parent
							
								
									19bf7a0e5a
								
							
						
					
					
						commit
						5c25279439
					
				@ -31,7 +31,7 @@ export default function Component({ service }) {
 | 
			
		||||
  const printingStateFalgs = ["Printing", "Paused", "Pausing", "Resuming"];
 | 
			
		||||
 | 
			
		||||
  if (printingStateFalgs.includes(state)) {
 | 
			
		||||
    const { completion } = jobStats.progress;
 | 
			
		||||
    const { completion } = jobStats?.progress ?? undefined;
 | 
			
		||||
 | 
			
		||||
    if (!jobStats || !completion) {
 | 
			
		||||
      return (
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user