[#152,timeline][xs]: handle null or undefined dates properly.

This commit is contained in:
Rufus Pollock
2012-06-10 14:23:03 +01:00
parent 6a746420c6
commit d2ce46cc42
2 changed files with 5 additions and 1 deletions

View File

@@ -103,6 +103,9 @@ my.Timeline = Backbone.View.extend({
},
_parseDate: function(date) {
if (!date) {
return null;
}
var out = date.trim();
out = out.replace(/(\d)th/g, '$1');
out = out.replace(/(\d)st/g, '$1');