Skip to content

fix: prevent undefined in generated event search descriptions#1515

Open
slash-init wants to merge 5 commits into
processing:mainfrom
slash-init:fix/event-search-description-undefined
Open

fix: prevent undefined in generated event search descriptions#1515
slash-init wants to merge 5 commits into
processing:mainfrom
slash-init:fix/event-search-description-undefined

Conversation

@slash-init

@slash-init slash-init commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

When generating the search index for events, data.description is undefined because event pages do not define a description field. Concatenating it with the page content appends the literal string "undefined" to every generated event description.

This PR uses a nullish fallback (data.description ?? "") to prevent generating incorrect search index data.
Fixes #1512

@ksen0

ksen0 commented Jul 14, 2026

Copy link
Copy Markdown
Member

Thanks @slash-init ! Possible to add to tests? Prevent regression / kind of a hard to spot problem

@slash-init

Copy link
Copy Markdown
Contributor Author

Sure @ksen0, I'll add a regression test covering this case.

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.

Event search index descriptions incorrectly end with "undefined"

2 participants