don't try to split empty value
[angular-drzb] / app / js / filters.js
index ae88186..1b331b0 100644 (file)
@@ -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/, '');