mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-02 22:00:34 +01:00
get correct count only from one of the active users elements
This commit is contained in:
@@ -23,7 +23,7 @@ define('forum/topic/browsing', function() {
|
||||
Browsing.onUserEnter = function(data) {
|
||||
var activeEl = $('.thread_active_users');
|
||||
var user = activeEl.find('a[data-uid="' + data.uid + '"]');
|
||||
if (!user.length && activeEl.children().length < 10) {
|
||||
if (!user.length && activeEl.first().children().length < 10) {
|
||||
addUserIcon(data);
|
||||
} else if (user.length) {
|
||||
user.attr('data-count', parseInt(user.attr('data-count'), 10) + 1);
|
||||
|
||||
Reference in New Issue
Block a user