Skip to content

Commit a5138c5

Browse files
committed
avoid an error when a root '/' is specified (fix #379)
1 parent a55c8cf commit a5138c5

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)