mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-20 15:30:39 +01:00
check against 0 first
This commit is contained in:
@@ -321,7 +321,7 @@ Sockets.getUidsInRoom = function(roomName) {
|
||||
var uids = [];
|
||||
var clients = io.sockets.clients(roomName);
|
||||
for(var i=0; i<clients.length; ++i) {
|
||||
if (uids.indexOf(clients[i].uid) === -1 && clients[i].uid !== 0) {
|
||||
if (clients[i].uid !== 0 && uids.indexOf(clients[i].uid) === -1) {
|
||||
uids.push(clients[i].uid);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user