Skip to content

Commit aea697f

Browse files
timeslider reset fix
1 parent e4133be commit aea697f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

js/script.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -706,9 +706,10 @@ require([
706706
orButton.style.backgroundColor = '#797979';
707707

708708
// reset time slider
709-
timeSlider.timeExtent.start = new Date(1850, 0, 1);
710-
timeSlider.timeExtent.end = new Date(2024, 0, 1);
711-
709+
if (timeSlider) {
710+
timeSlider.timeExtent.start = new Date(1850, 0, 1);
711+
timeSlider.timeExtent.end = new Date(2024, 0, 1);
712+
}
712713
// clear sketches
713714
clearBtn.click();
714715

0 commit comments

Comments
 (0)