fixed categories.js socket callbacks

This commit is contained in:
Julian Lam
2014-01-16 19:57:28 -05:00
parent 8041bee9fd
commit cbb630fd6b
3 changed files with 8 additions and 14 deletions

View File

@@ -132,16 +132,16 @@ define(['composer'], function(composer) {
socket.emit('categories.loadMore', {
cid: cid,
after: $('#topics-container').children('.category-item').length
}, function (data) {
if (data.topics.length) {
}, function (err, data) {
if (!err && data.topics.length) {
Category.onTopicsLoaded(data.topics);
}
loadingMoreTopics = false;
});
}
function renderRecentReplies(posts) {
if (!posts || posts.length === 0) {
function renderRecentReplies(err, posts) {
if (err || !posts || posts.length === 0) {
return;
}