Skip to content

Send empty set when search yields no results#82

Merged
GaryJones merged 1 commit intoAutomattic:mainfrom
dlh01:hotfix/no-results
Aug 8, 2024
Merged

Send empty set when search yields no results#82
GaryJones merged 1 commit intoAutomattic:mainfrom
dlh01:hotfix/no-results

Conversation

@dlh01
Copy link
Contributor

@dlh01 dlh01 commented May 6, 2021

When a search for content yields no results, Zoninator exits without sending a response. jQuery interprets this response to represent a failed request (I believe because it interprets it as malformed JSON) and never fires the "success" callback that removes the loading spinner, making it look to the user as though they're still waiting for search results. Sending an empty array back to the browser appears to address this issue.

@GaryJones GaryJones added the type: bug Something isn't working label Aug 8, 2024
@GaryJones GaryJones added this to the 0.10.0 milestone Aug 8, 2024
@GaryJones GaryJones merged commit a85bb1a into Automattic:main Aug 8, 2024
@GaryJones
Copy link
Contributor

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants