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

fix(rendering): ensure resilience against "null" results #6442

Merged
merged 4 commits into from
Dec 9, 2024

Conversation

Haroenv
Copy link
Contributor

@Haroenv Haroenv commented Nov 19, 2024

Summary

In some cases results in render can be null:

In the vast majority of cases we already handled results being null or undefined just in case, but now i've changed the type to ensure we always catch this problem

Result

null is handled in all cases for results

This issue doesn't have a reproduction, but i believe it now guards for all possible cases of "no results", so:
fixes #6441

CR-7353

In some cases `results` in `render` can be null:
- no index name passed
- stalled render

In the vast majority of cases we already handled `results` being `null` or `undefined` just in case, but now i've changed the type to ensure we always catch this problem

This issue doesn't have a reproduction, but i believe it now guards for all possible cases of "no results", so:
fixes #6441

[CR-7353]
Copy link

codesandbox-ci bot commented Nov 19, 2024

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.

@Haroenv Haroenv marked this pull request as ready for review November 19, 2024 15:09
@Haroenv Haroenv requested review from a team, dhayab and shaejaz and removed request for a team November 19, 2024 15:09
Copy link
Contributor

@shaejaz shaejaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!
Since this might result in type errors, would this count as a breaking change?

@Haroenv
Copy link
Contributor Author

Haroenv commented Nov 19, 2024

don't think so as the type already was able to be null, it was just typed wrong @shaejaz

@Haroenv Haroenv added the 🚨 DO NOT MERGE for a pull request that is ready to review, but should not be merged yet label Nov 20, 2024
@Haroenv
Copy link
Contributor Author

Haroenv commented Nov 20, 2024

This will be merged and released after code freeze is over; if you bump into the "results is null" error, you can ignore it as the page still behaves correctly, when results is null no events can have happened yet

@dhayab dhayab removed the 🚨 DO NOT MERGE for a pull request that is ready to review, but should not be merged yet label Dec 9, 2024
@dhayab dhayab merged commit a3f0e18 into master Dec 9, 2024
15 checks passed
@dhayab dhayab deleted the fix/prevent-null branch December 9, 2024 09:22
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.

getRefinements can receive null and system crashes when it does.
3 participants