diff --git a/pom.xml b/pom.xml index 93d67b0..2e95d7d 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 org.fao.unredd portal - 3.0 + 3.0.1 war UNREDD Portal http://maven.apache.org diff --git a/src/main/webapp/modules/time-slider.js b/src/main/webapp/modules/time-slider.js index 52b80ee..495dd51 100644 --- a/src/main/webapp/modules/time-slider.js +++ b/src/main/webapp/modules/time-slider.js @@ -17,10 +17,12 @@ define([ "jquery", "message-bus", "layout", "jquery-ui", "i18n" ], function($, b div.append(divTimeSlider); divTimeSlider.slider({ change : function(event, ui) { - var d = new Date(); - d.setISO8601(timestamps[ui.value]); - divTimeSliderLabel.text(getLocalizedDate(timestamps[ui.value])); - bus.send("time-slider.selection", d); + if (timestamps.length > 0) { + var d = new Date(); + d.setISO8601(timestamps[ui.value]); + divTimeSliderLabel.text(getLocalizedDate(timestamps[ui.value])); + bus.send("time-slider.selection", d); + } } }); divTimeSlider.slider("option", "min", 0);