Browse Source

fix for empty strings

Davide Alberani 6 years ago
parent
commit
e7d1ed6faa
2 changed files with 4 additions and 1 deletions
  1. 3 0
      dist/history.html
  2. 1 1
      dist/index.html

+ 3 - 0
dist/history.html

@@ -91,6 +91,9 @@ var app = new Vue({
             return cid.substring(0, 7);
         },
         prettifyDate: function(date) {
+            if (!date) {
+                return '';
+            }
             return date.substring(0, date.indexOf('.'));
         },
         updateFilter: function() {

+ 1 - 1
dist/index.html

@@ -101,7 +101,7 @@ var app = new Vue({
             return link;
         },
         prettifyLastCheck: function(item) {
-            var last = item.last_history && item.last_history.message;
+            var last = (item.last_history && item.last_history.message) || '';
             return last.substring(0, last.indexOf('.'));
         },
         triggerString: function(item) {