From 87d785560f074f03efbbefd52ab048237206f72d Mon Sep 17 00:00:00 2001 From: Natty Date: Sun, 3 Sep 2023 01:15:59 +0200 Subject: [PATCH] Fixed an off-by-one error (two of them actually) --- create-circle.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/create-circle.js b/create-circle.js index 648d2ef..2f18065 100644 --- a/create-circle.js +++ b/create-circle.js @@ -1083,7 +1083,8 @@ function showConnections(localUser, connectionList) { let udNum = 0; if (i > numb[0]) udNum = 1; if (i > numb[0] + numb[1]) udNum = 2; - usersDivs[udNum].appendChild(newUser); + if (i <= numb[0] + numb[1] + numb[2]) + usersDivs[udNum].appendChild(newUser); } usersDivs.forEach((div) => {