Skip to content

fix(connectHits): use optional chaining for results.hits length check #6634

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Wcdaren
Copy link

@Wcdaren Wcdaren commented May 7, 2025

Summary

image

When I use searchkit, even if I report a fixed format containing hits, I still encounter this situation where hits are missing. Therefore, I think a judgment can be added here

Result

Copy link

codesandbox-ci bot commented May 7, 2025

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 712554f:

Sandbox Source
example-instantsearch-getting-started Configuration
example-react-instantsearch-getting-started Configuration
example-react-instantsearch-next-app-dir-example Configuration
example-react-instantsearch-next-routing-example Configuration
example-vue-instantsearch-getting-started Configuration

@Haroenv
Copy link
Contributor

Haroenv commented May 12, 2025

can you add a PR to search kit to ensure an empty hits is always returned? this matches the guarantees of the search method

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