-
-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
Why is it designed as below? it will cause history.replaceState method to be called #3447
Labels
contribution welcome
fixed on 4.x
This issue has been already fixed on the v4 but exists in v3
improvement
Comments
wxwzl
changed the title
Why is it designed as below? it will cause replaceState method called
Why is it designed as below? it will cause history.replaceState method called
Jan 14, 2021
wxwzl
changed the title
Why is it designed as below? it will cause history.replaceState method called
Why is it designed as below? it will cause history.replaceState method to be called
Jan 14, 2021
posva
added
the
fixed on 4.x
This issue has been already fixed on the v4 but exists in v3
label
Jan 14, 2021
Given the architecture on v3, it might be problematic to change the check to avoid calling |
This was referenced Jan 24, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
contribution welcome
fixed on 4.x
This issue has been already fixed on the v4 but exists in v3
improvement
Version
3.4.9
Reproduction link
https://vesaas.com/?a=1&b=2&a=2
Steps to reproduce
input https://vesaas.com/?a=1&b=2&a=2 into webBroswer . then it becomes to https://vesaas.com/?a=1&a=2&b=2
What is expected?
do not trigger history.replaceState called
What is actually happening?
history.replaceState was called.
src/history/html5.js
ensureURL (push?: boolean) { if (getLocation(this.base) !== this.current.fullPath) { const current = cleanPath(this.base this.current.fullPath) push ? pushState(current) : replaceState(current) } }
src/util/query.js
`function parseQuery (query: string): Dictionary {
const res = {}
query = query.trim().replace(/^(?|#|&)/, '')
if (!query) {
return res
}
query.split('&').forEach(param => {
const parts = param.replace(/\ /g, ' ').split('=')
const key = decode(parts.shift())
const val = parts.length > 0
? decode(parts.join('='))
: null
})
return res
}`
The text was updated successfully, but these errors were encountered: