reset date range if hash is empty
This commit is contained in:
		
							parent
							
								
									6b8c2062ef
								
							
						
					
					
						commit
						896ab47424
					
				
					 1 changed files with 3 additions and 5 deletions
				
			
		| 
						 | 
				
			
			@ -1,9 +1,7 @@
 | 
			
		|||
const hash = window.location.hash.substring(1);
 | 
			
		||||
if (hash !== "") {
 | 
			
		||||
    const [start, end] = hash.split(":");
 | 
			
		||||
const [start, end] = (hash !== "") ? hash.split(":") : ["", ""];
 | 
			
		||||
document.getElementById('startDate').value = start;
 | 
			
		||||
document.getElementById('endDate').value = end;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
fetch('/data.json')
 | 
			
		||||
    .then(resp => resp.json())
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue