Skip to content

Conversation

@lungarella-raffaele
Copy link
Contributor

Fixes #1161
While working with the project, I discovered that Algolia sends unexpected null values when searching for certain strings. The culprits appear to be "publish" and "libraries", which both reference markdown-pages/docs/manual/libraries.mdx. When searching for a substring within this page, DocSearch crashes because it attempts to call replace on an lvl1 value that is null.
During my investigation, I noticed that Algolia was sending content that doesn't exist on the same page, maybe some misalignment? So perhaps that's the reason for this bug and my fix may be redundant. However, if Algolia can send null values, it's breaking the specified contract and we shouldn't trust their data implicitly.

Does my fix makes sense? Or there is a better way?

Copy link
Collaborator

@aspeddro aspeddro left a comment

Choose a reason for hiding this comment

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

@aspeddro aspeddro merged commit 18f7895 into rescript-lang:master Jan 28, 2026
1 check passed
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.

Error when searching "pu"

2 participants