Commit f982d4f
committed
fix(inspector): fix pagination (#4091)
# Description
This PR fixes two issues in the engine data provider:
1. Added optional chaining to `lastPage.pagination.cursor` in the actors query to prevent potential null reference errors.
2. Re-enabled pagination for the names query by uncommenting and implementing the `getNextPageParam` function, which now properly checks if the number of names is less than `RECORDS_PER_PAGE` before returning the cursor.
## Type of change
- [x] Bug fix (non-breaking change which fixes an issue)
## How Has This Been Tested?
Verified that the actors query handles cases where pagination might be null, and confirmed that names pagination now works correctly when fetching multiple pages of data.
## Checklist:
- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my code
- [x] I have commented my code, particularly in hard-to-understand areas
- [x] My changes generate no new warnings1 parent cf5c35e commit f982d4f
1 file changed
+5
-5
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments