From 9d4c3039e789bf78610982fbd7f521a3e3a7a95e Mon Sep 17 00:00:00 2001 From: Paulo Jorge Reis Date: Thu, 15 Nov 2018 09:40:00 +0000 Subject: [PATCH] Merge pull request #1123 from sharelatex/as-fix-missing-dates Don't show missing dates and show confirmed emails in admin console GitOrigin-RevId: 6866d7869ec852de89be35b7b3d0725dcc195e6e --- services/web/public/src/filters/formatDate.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/services/web/public/src/filters/formatDate.js b/services/web/public/src/filters/formatDate.js index b50b0a6a2a..0ac8a53a38 100644 --- a/services/web/public/src/filters/formatDate.js +++ b/services/web/public/src/filters/formatDate.js @@ -25,6 +25,7 @@ define(['base', 'moment'], function(App, moment) { 'formatDate', () => function(date, format) { + if (!date) return 'N/A' if (format == null) { format = 'Do MMM YYYY, h:mm a' } @@ -34,5 +35,5 @@ define(['base', 'moment'], function(App, moment) { App.filter('relativeDate', () => date => moment(date).calendar()) - return App.filter('fromNowDate', () => date => moment(date).fromNow()) + App.filter('fromNowDate', () => date => moment(date).fromNow()) })