replaceState Error when path starts with // and scrollBehavior is set #2593
Description
Version
3.0.2
Reproduction link
https://github.com/yegorLitvinov/vue-router-bug
Steps to reproduce
Set scrollBehavior property in router config. Put two forward slashes into beginning of the url (e.g. http://localhost:8081//about)
What is expected?
No errors in console
What is actually happening?
In firefox: SecurityError: The operation is insecure.
In Chrome: Uncaught DOMException: Failed to execute 'replaceState' on 'History': A history state object with URL 'http://about/' cannot be created in a document with origin 'http://localhost:8081' and URL 'http://localhost:8081//about'