Browse Source

HUE-2125 [search] Invalid date label on timeline chart

Added check for valid date
Enrico Berti 11 years ago
parent
commit
8611fc0
1 changed files with 1 additions and 1 deletions
  1. 1 1
      apps/search/static/js/charts.ko.js

+ 1 - 1
apps/search/static/js/charts.ko.js

@@ -286,7 +286,7 @@ function barChart(element, options, isTimeline) {
     var insertLinebreaks = function (d) {
       var _el = d3.select(this);
       var _mom = moment(d);
-      if (_mom != null) {
+      if (_mom != null && _mom.isValid()) {
         var _words = _mom.format("hh:mm:ss YYYY-MM-DD").split(" ");
         _el.text('');
         for (var i = 0; i < _words.length; i++) {