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(client router): tolerant invalid hash selector typo #506

Merged
merged 1 commit into from Feb 22, 2022

Conversation

Ericteen
Copy link
Contributor

parameter of element.classList.contains() should be a string without selector prefix .

- target = el.classList.contains('.header-anchor')
+ target = el.classList.contains('header-anchor')
      ? el
      : document.querySelector(decodeURIComponent(hash))

@yyx990803 yyx990803 merged commit ffe0c40 into vuejs:main Feb 22, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 21, 2023
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.

None yet

2 participants