Handle callback errors

This commit is contained in:
Mathias Schreck
2016-08-16 19:46:59 +02:00
parent d43c19c173
commit ce9ee62fa0
64 changed files with 359 additions and 23 deletions

View File

@@ -127,6 +127,9 @@ define('forum/topic', [
Topic.toBottom = function() {
socket.emit('topics.postcount', ajaxify.data.tid, function(err, postCount) {
if (err) {
return app.alertError(err.message);
}
if (config.topicPostSort !== 'oldest_to_newest') {
postCount = 2;
}