Skip to content

Commit 142724e

Browse files
committed
fix up useBundleAssetsLogic
1 parent 8c56994 commit 142724e

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/services/bundleAnalysis/useBundleAssets.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,8 +253,8 @@ export const BundleAssetsQueryOpts = ({
253253
queryFn: ({ signal, pageParam }) => {
254254
// We have to do this, because infiniteQuery in Tanstack Query V5
255255
// doesn't support undefined as a pageParam
256-
let assetsAfter: string | undefined = undefined
257-
if (pageParam !== null) {
256+
let assetsAfter: string | null = null
257+
if (pageParam !== '') {
258258
assetsAfter = pageParam
259259
}
260260

@@ -342,6 +342,8 @@ export const BundleAssetsQueryOpts = ({
342342
}
343343
})
344344
},
345+
// We have to set this as an empty string, because the type for pageParam
346+
// matches the type for initialPageParam.
345347
initialPageParam: '',
346348
getNextPageParam: (data) => {
347349
return data?.pageInfo?.hasNextPage ? data?.pageInfo?.endCursor : null

0 commit comments

Comments
 (0)