fixes #1694 hide nr for 1 spec (somewhat common)

This commit is contained in:
Jimmie Elvenmark 2016-03-21 23:12:36 +01:00
parent e5b897ada8
commit 81c6eacafd

View file

@ -1501,7 +1501,8 @@ lichess.numberFormat = (function() {
if (self.number.length) self.number.text(data.nb);
if (data.users) {
var tags = data.users.map($.userLink);
if (data.anons) tags.push('Anonymous(' + data.anons + ')');
if (data.anons === 1) tags.push('Anonymous');
else if (data.anons) tags.push('Anonymous(' + data.anons + ')');
self.list.html(tags.join(', '));
} else if (!self.number.length) self.list.html(data.nb + ' players in the chat');