Skip to content

Commit

Permalink
Fix undefined state from react-router-dom. (#6293)
Browse files Browse the repository at this point in the history
Fix state not well typed from react-router-dom, it can be undefined and
we should check for that.
  • Loading branch information
lucasbordeau authored Jul 16, 2024
1 parent 9711a43 commit 8833a38
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export const useRecordShowPagePagination = (

const { state } = useLocation();

const cursorFromIndexPage = state.cursor;
const cursorFromIndexPage = state?.cursor;

const { loading: loadingCurrentRecord, pageInfo: currentRecordsPageInfo } =
useFindManyRecords({
Expand Down

0 comments on commit 8833a38

Please sign in to comment.