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: tolerant invalid hash #399

Merged
merged 1 commit into from
Oct 7, 2021
Merged

fix: tolerant invalid hash #399

merged 1 commit into from
Oct 7, 2021

Conversation

antfu
Copy link
Member

@antfu antfu commented Sep 24, 2021

In some cases, users might have custom logic to control the hash and possibly make the hash an invalid selector. This PR makes the router tolerant in those cases.

Copy link
Member

@posva posva left a comment

Choose a reason for hiding this comment

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

LGTM!
I think this is good but I wrote about possible outcomes when using querySelector vs getElementById at https://github.com/vuejs/vue-router-next/blob/master/src/scrollBehavior.ts#L85 in case it's an interesting topic

@yyx990803 yyx990803 merged commit efc5e1b into main Oct 7, 2021
@antfu antfu deleted the fix/tolerant-invalid-hash branch October 8, 2021 07:06
@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.

3 participants