mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-06 14:05:46 +01:00
fixed crash if empty topic was loaded without ajaxify
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user