reset date range if hash is empty

This commit is contained in:
xenofem 2022-04-16 02:54:20 -04:00
parent 6b8c2062ef
commit 896ab47424

View file

@ -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())