mirror of
				https://github.com/qurator-spk/neat.git
				synced 2025-11-04 02:34:14 +01:00 
			
		
		
		
	handle empty files more gracefully.
This commit is contained in:
		
							parent
							
								
									98c564ca57
								
							
						
					
					
						commit
						b1181f0baf
					
				
					 1 changed files with 9 additions and 1 deletions
				
			
		
							
								
								
									
										10
									
								
								neat.js
									
										
									
									
									
								
							
							
						
						
									
										10
									
								
								neat.js
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -48,7 +48,15 @@ function loadFile(evt, onComplete) {
 | 
			
		|||
 | 
			
		||||
function setupInterface(data, file, urls) {
 | 
			
		||||
 | 
			
		||||
    if (data.data.length <= 0)  return null;
 | 
			
		||||
    if (data.data.length <= 0) {
 | 
			
		||||
        let empty_html = `
 | 
			
		||||
            File is empty.
 | 
			
		||||
            <a href="neat.html"> Load another one.</a>
 | 
			
		||||
        `;
 | 
			
		||||
 | 
			
		||||
        $('#tableregion').html(empty_html);
 | 
			
		||||
        return null;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    // private variables of app
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue