From 883ae85dc25d22b27620fdf8aea9c0c160b7e6ef Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Fri, 18 Jan 2013 13:51:04 +0100 Subject: [PATCH] don't try to split empty value --- app/js/filters.js | 1 + 1 file changed, 1 insertion(+) diff --git a/app/js/filters.js b/app/js/filters.js index ae88186..1b331b0 100644 --- a/app/js/filters.js +++ b/app/js/filters.js @@ -10,6 +10,7 @@ angular.module('myApp.filters', []). }]). filter('registration_date_time', function() { return function(text) { + if ( ! text ) return '?'; var timestamp = parseInt( text.split(/\./)[1] ); var date = new Date(timestamp / 100); // 100000 / 1000 return date.toISOString().replace(/T/, ' ').replace(/\.[0-9]{3}Z/, ''); -- 2.20.1