Skip to content

Commit 524c24f

Browse files
committed
removes redundant variables
1 parent 7a46ab2 commit 524c24f

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

web-server/pages/api/internal/[org_id]/git_provider_org.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,9 @@ async function getRepos(
101101
let allRepos: any[] = [];
102102
let url = `${baseUrl}?${params.toString()}`;
103103
let response: Response;
104-
let count = 0;
105104

106105
do {
107-
if (count >= THRESHOLD) {
106+
if (allRepos.length >= THRESHOLD) {
108107
break;
109108
}
110109
response = await fetch(url, {
@@ -119,7 +118,6 @@ async function getRepos(
119118

120119
const data = (await response.json()) as any[];
121120
allRepos = allRepos.concat(data);
122-
count += data.length;
123121

124122
const nextLink = response.headers.get('Link');
125123
if (nextLink) {

0 commit comments

Comments
 (0)