From ddb9a4a60e0090580e92f9d3b553dc477e10776a Mon Sep 17 00:00:00 2001 From: Baris Soner Usakli Date: Thu, 16 Jan 2014 18:12:31 -0500 Subject: [PATCH] fixed user load more --- public/src/forum/admin/users.js | 4 ++-- public/src/forum/users.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/public/src/forum/admin/users.js b/public/src/forum/admin/users.js index d95228b9a3..802431735c 100644 --- a/public/src/forum/admin/users.js +++ b/public/src/forum/admin/users.js @@ -245,8 +245,8 @@ define(function() { socket.emit('user.loadMore', { set: set, after: $('#users-container').children().length - }, function(data) { - if (data.users.length) { + }, function(err, data) { + if (data && data.users.length) { onUsersLoaded(data.users); } loadingMoreUsers = false; diff --git a/public/src/forum/users.js b/public/src/forum/users.js index 28bc10a67b..de00f3bc38 100644 --- a/public/src/forum/users.js +++ b/public/src/forum/users.js @@ -126,8 +126,8 @@ define(function() { socket.emit('user.loadMore', { set: set, after: after - }, function(data) { - if (data.users.length) { + }, function(err, data) { + if (data && data.users.length) { onUsersLoaded(data.users, emptyContainer); $('#load-more-users-btn').removeClass('disabled'); } else {