fix: tests

v1.18.x
Barış Soner Uşaklı 5 years ago
parent dd3893b134
commit b73aa84ddc

@ -156,7 +156,7 @@ Groups.getOwnersAndMembers = async function (groupName, uid, start, stop) {
let done = false; let done = false;
let returnUsers = owners; let returnUsers = owners;
let memberStart = start - ownerUids.length + 1; let memberStart = start - ownerUids.length;
let memberStop = memberStart + countToReturn - 1; let memberStop = memberStart + countToReturn - 1;
memberStart = Math.max(0, memberStart); memberStart = Math.max(0, memberStart);
memberStop = Math.max(0, memberStop); memberStop = Math.max(0, memberStop);
@ -175,8 +175,8 @@ Groups.getOwnersAndMembers = async function (groupName, uid, start, stop) {
while (returnUsers.length < countToReturn && !done) { while (returnUsers.length < countToReturn && !done) {
/* eslint-disable no-await-in-loop */ /* eslint-disable no-await-in-loop */
await addMembers(memberStart, memberStop); await addMembers(memberStart, memberStop);
memberStart += countToReturn; memberStart = memberStop + 1;
memberStop += countToReturn; memberStop = memberStart + countToReturn - 1;
} }
} }

Loading…
Cancel
Save