Skip to content

Commit

Permalink
fix: update remove pageSizeState
Browse files Browse the repository at this point in the history
  • Loading branch information
Marc Pomar committed Mar 25, 2024
1 parent 1fc6db2 commit 07dd483
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/useSWRPaginated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export function useSWRPaginated<T, P extends Page<T> = Page<T>>(
base: string | null,
config?: PaginationParams & SWRInfiniteConfiguration<P, Error, BareFetcher<P>>
) {
const pageSize = useMemo(() => config.pageSize || 40, [config.pageSize]);
const pageSize = useMemo(() => config?.pageSize || 40, [config?.pageSize]);

const getKey = useMemo(
() => (pageIndex, previousPageData) => {
Expand Down

0 comments on commit 07dd483

Please sign in to comment.