From 7e8d6d110060498429a5b942789274d7ca217136 Mon Sep 17 00:00:00 2001 From: Upayavira Date: Sun, 12 Jul 2015 20:23:28 +0000 Subject: [PATCH] SOLR-7780 Prevent NaN showing on angular UI dashboard git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1690522 13f79535-47bb-0310-9956-ffa450edef68 --- solr/webapp/web/libs/ngtimeago.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/solr/webapp/web/libs/ngtimeago.js b/solr/webapp/web/libs/ngtimeago.js index 9d1b4277d4a..dc29b18dd2e 100644 --- a/solr/webapp/web/libs/ngtimeago.js +++ b/solr/webapp/web/libs/ngtimeago.js @@ -27,6 +27,10 @@ var catalyst = angular.module('ngtimeago', []); catalyst.filter('timeago', function() { return function(input, p_allowFuture) { + + if (input === undefined) { + return "-"; + } var substitute = function (stringOrFunction, number, strings) { var string = angular.isFunction(stringOrFunction) ? stringOrFunction(number, dateDifference) : stringOrFunction;