Skip to content

Commit bb20060

Browse files
committed
Merge pull request #418 from tejitak/issue-379
Avoid an error when a root '/' for VueRouter is specified (fix #379)
2 parents a55c8cf + a5138c5 commit bb20060

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/history/html5.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const hashRE = /#.*$/
44
export default class HTML5History {
55

66
constructor ({ root, onChange }) {
7-
if (root) {
7+
if (root && root !== '/') {
88
// make sure there's the starting slash
99
if (root.charAt(0) !== '/') {
1010
root = '/' + root

0 commit comments

Comments
 (0)