Skip to content

Commit

Permalink
Merge pull request #205 from HunnySajid/fix/breakout-loop
Browse files Browse the repository at this point in the history
fix: break out of loop when length is zero
  • Loading branch information
HunnySajid authored Oct 1, 2024
2 parents d51ba75 + 5d9f4d2 commit 4ed4556
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/pages/background/services/signify.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,11 @@ const Signify = () => {
let total = 0;
do {
const res = await _client?.identifiers().list(start);
if (res.aids?.length) {
aids.push(...res.aids);
if (res.aids?.length === 0) {
break;
}

aids.push(...res.aids);
total = res.total;
start = aids.length;
} while (aids.length < total);
Expand Down

0 comments on commit 4ed4556

Please sign in to comment.