fixed crash if empty topic was loaded without ajaxify

This commit is contained in:
Baris Soner Usakli
2014-01-18 23:18:58 -05:00
parent 84cbcc5a97
commit bbac361670
7 changed files with 58 additions and 38 deletions

View File

@@ -182,7 +182,17 @@
return (n / 1000).toFixed(1) + 'k';
}
return n;
},
toISOString: function(timestamp) {
try {
return new Date(parseInt(timestamp, 10)).toISOString();
} catch(e){
console.log(e.message);
}
return new Date(parseInt(0, 10)).toISOString();
}
};