From 540308a9b4412d08e75eaa8de3bca8d5bb60020f Mon Sep 17 00:00:00 2001 From: Jared Tabor Date: Tue, 2 Jun 2015 13:57:59 -0400 Subject: [PATCH] "Invalid Date" fix for jobs page returning an empty string for when the date format filter receives a null object --- awx/ui/static/js/shared/long-date.filter.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/awx/ui/static/js/shared/long-date.filter.js b/awx/ui/static/js/shared/long-date.filter.js index 254c4cd09c..98978cd6f1 100644 --- a/awx/ui/static/js/shared/long-date.filter.js +++ b/awx/ui/static/js/shared/long-date.filter.js @@ -5,8 +5,13 @@ *************************************************/ function longDateFilter(moment, input) { - var date = moment(input); - return date.format('l LTS'); + var date; + if(input === null){ + return ""; + }else { + date = moment(input); + return date.format('l LTS'); + } } angular.module('longDateFilter', [])