Skip to content

Commit b710b2e

Browse files
committed
fix router-link href for hash mode with no base (fix #969)
1 parent 154e269 commit b710b2e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,8 @@ export default class VueRouter {
150150
}
151151

152152
function createHref (base: string, fullPath: string, mode) {
153-
var path = mode === 'hash' ? '/#' + fullPath : fullPath
154-
return base ? cleanPath(base + path) : path
153+
var path = mode === 'hash' ? '#' + fullPath : fullPath
154+
return base ? cleanPath(base + '/' + path) : path
155155
}
156156

157157
VueRouter.install = install

0 commit comments

Comments
 (0)