Skip to content

fix: prevent JS error into handleSearchHotKey method when algolia is enabled #4782

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

Merged
merged 2 commits into from
Jun 10, 2025

Conversation

LouisMazel
Copy link
Contributor

@LouisMazel LouisMazel commented Jun 10, 2025

Description

Hi,

image

Fix error in handleSearchHotKey when event.key is undefined

I'm using VitePress 2.0.0-alpha.5.

This PR fixes a runtime error that occurs when event.key is undefined:

Uncaught TypeError: Cannot read properties of undefined (reading 'toLowerCase')
    at handleSearchHotKey (VPNavBarSearch.vue:56:18)

Tip

The author of this PR can publish a preview release by commenting /publish below.

@brc-dd brc-dd merged commit 21fcecc into vuejs:main Jun 10, 2025
9 checks passed
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 18, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants