Skip to content

Commit 8e5da25

Browse files
fix: handle url in response when using pagination with compareCommits (#686)
* fix: handle url in response when using pagination with compareCommits and compareCommitsWithBaseHead * style: prettier * chore: run fix prettier errors --------- Co-authored-by: wolfy1339 <[email protected]>
1 parent 6d8ea8a commit 8e5da25

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/normalize-paginated-list-response.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ export function normalizePaginatedListResponse(
2828
};
2929
}
3030
const responseNeedsNormalization =
31-
("total_count" in response.data && !("url" in response.data)) ||
32-
"total_commits" in response.data;
31+
("total_count" in response.data || "total_commits" in response.data) &&
32+
!("url" in response.data);
3333
if (!responseNeedsNormalization) return response;
3434

3535
// keep the additional properties intact as there is currently no other way

0 commit comments

Comments
 (0)