projects
/
angular-drzb
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
494e80b
)
don't try to split empty value
drzb2013v2
author
Dobrica Pavlinusic
<dpavlin@rot13.org>
Fri, 18 Jan 2013 12:51:04 +0000
(13:51 +0100)
committer
Dobrica Pavlinusic
<dpavlin@rot13.org>
Fri, 18 Jan 2013 12:51:43 +0000
(13:51 +0100)
app/js/filters.js
patch
|
blob
|
history
diff --git
a/app/js/filters.js
b/app/js/filters.js
index
ae88186
..
1b331b0
100644
(file)
--- 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/, '');