"Invalid Date" fix for jobs page

returning an empty string for when the date format filter receives a null object
This commit is contained in:
Jared Tabor
2015-06-02 13:57:59 -04:00
parent 633647a2a8
commit 540308a9b4

View File

@@ -5,8 +5,13 @@
*************************************************/ *************************************************/
function longDateFilter(moment, input) { function longDateFilter(moment, input) {
var date = moment(input); var date;
return date.format('l LTS'); if(input === null){
return "";
}else {
date = moment(input);
return date.format('l LTS');
}
} }
angular.module('longDateFilter', []) angular.module('longDateFilter', [])