don't try to split empty value drzb2013v2
authorDobrica Pavlinusic <dpavlin@rot13.org>
Fri, 18 Jan 2013 12:51:04 +0000 (13:51 +0100)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Fri, 18 Jan 2013 12:51:43 +0000 (13:51 +0100)
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/, '');