Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug Fix: handle non existent data field in paginated data #1359

Merged
merged 2 commits into from
Apr 3, 2025

Conversation

jcscottiii
Copy link
Collaborator

@jcscottiii jcscottiii commented Apr 3, 2025

The new list user saved searches returns no data field in the page if there is none. That list method uses a helper method that does the iteration for us. But previous routes always had a data field in the object

A logged in user will get this error in the console:

TypeError: a.data is not iterable (cannot read property undefined)

As well as see a toast like this:

image

This solves that


Long term, we should decide if we should provide the data field for all paginated routes. Even if there is no data.

The new list user saved searches returns no data field in the page if there is none.

A logged in user will get this error in the console:

```
TypeError: a.data is not iterable (cannot read property undefined)
```

This solves that
@jcscottiii jcscottiii requested review from jrobbins and KyleJu April 3, 2025 01:15
@jcscottiii jcscottiii changed the title Bug Fix: handle non existent data in page Bug Fix: handle non existent data field in paginated data Apr 3, 2025
@jcscottiii jcscottiii enabled auto-merge April 3, 2025 02:00
@jcscottiii jcscottiii added this pull request to the merge queue Apr 3, 2025
Merged via the queue into main with commit 8021816 Apr 3, 2025
6 checks passed
@jcscottiii jcscottiii deleted the jcscottiii/bug-fix-2025-04-02 branch April 3, 2025 02:32
@jcscottiii jcscottiii mentioned this pull request Apr 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants