Skip to content

Commit

Permalink
fix: empty string initialPageParam breaking ReposTeamQueryOpts (#3626)
Browse files Browse the repository at this point in the history
  • Loading branch information
spalmurray-codecov authored Jan 3, 2025
1 parent 7722e18 commit 324ff6c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/services/repos/ReposTeamQueryOpts.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ describe('useReposTeam', () => {
},
},
],
pageParams: [''],
pageParams: [undefined],
})
)
})
Expand Down Expand Up @@ -200,7 +200,7 @@ describe('useReposTeam', () => {
pageInfo: { hasNextPage: false, endCursor: 'aa' },
},
],
pageParams: ['', 'MjAyMC0wOC0xMSAxNzozMDowMiswMDowMHwxMDA='],
pageParams: [undefined, 'MjAyMC0wOC0xMSAxNzozMDowMiswMDowMHwxMDA='],
})
)
})
Expand Down
2 changes: 1 addition & 1 deletion src/services/repos/ReposTeamQueryOpts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ function ReposTeamQueryOpts({
}
})
},
initialPageParam: '',
initialPageParam: undefined as string | undefined,
getNextPageParam: (data) => {
if (data?.pageInfo?.hasNextPage) {
return data.pageInfo.endCursor
Expand Down

0 comments on commit 324ff6c

Please sign in to comment.