Copy by reference as the object is not used anymore

JS methods weren't copied usign assign, so indexOf could not be found.
Giving up and allowing a copy by reference as we don't need that data anymore.
This commit is contained in:
Diana Corbacho 2018-06-26 11:30:31 +01:00 committed by kjnilsson
parent 8cd188b67d
commit de414e81d3
1 changed files with 1 additions and 1 deletions

View File

@ -193,7 +193,7 @@ function fmt_sync_state(queue) {
function fmt_members(queue) { function fmt_members(queue) {
var res = ''; var res = '';
var IsMayority = (queue.online.length >= (Math.floor(queue.members.length / 2) + 1)); var IsMayority = (queue.online.length >= (Math.floor(queue.members.length / 2) + 1));
var followers = Object.assign({}, queue.online); var followers = queue.online;
followers.splice(followers.indexOf(queue.node), 1); followers.splice(followers.indexOf(queue.node), 1);
if (IsMayority) { if (IsMayority) {
res += ' <abbr title="Followers: ' + followers + '">+' + res += ' <abbr title="Followers: ' + followers + '">+' +