Skip to content

Commit

Permalink
Merge pull request #418 from tejitak/issue-379
Browse files Browse the repository at this point in the history
Avoid an error when a root '/' for VueRouter is specified (fix #379)
  • Loading branch information
yyx990803 committed Mar 23, 2016
2 parents a55c8cf + a5138c5 commit bb20060
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/history/html5.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const hashRE = /#.*$/
export default class HTML5History {

constructor ({ root, onChange }) {
if (root) {
if (root && root !== '/') {
// make sure there's the starting slash
if (root.charAt(0) !== '/') {
root = '/' + root
Expand Down

0 comments on commit bb20060

Please sign in to comment.