lib/oxidized/web/public/scripts/oxidized.js in oxidized-web-0.7.1 vs lib/oxidized/web/public/scripts/oxidized.js in oxidized-web-0.8.0
- old
+ new
@@ -42,10 +42,10 @@
* Requires that element have a text in the format of `YYYY-mm-dd HH:MM:SS`
* See ytti/oxidized-web #16
*/
$('.time').each(function() {
var content = $(this).text();
- if(content === 'never') { return; }
+ if(content === 'never' || content === '') { return; }
var utcTime = content.split(' ');
var date = new Date(utcTime[0] + 'T' + utcTime[1] + 'Z');
var year = date.getFullYear();
var month = ("0"+(date.getMonth()+1)).slice(-2);
var day = ("0" + date.getDate()).slice(-2);