Skip to content

Node.js based forum software built for the modern web

check against 0 first

barisusaklid12a526e82a9
diff --git a/src/socket.io/index.js b/src/socket.io/index.js
index 64b1ae8f39..befcb0cc0b 100644
--- a/src/socket.io/index.js
+++ b/src/socket.io/index.js
@@ -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);
}
}