Skip to content

Commit 4685f28

Browse files
committed
change relativize helper to passhtrough anything that doesn't start with # or /
1 parent 75b080c commit 4685f28

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/helpers/relativize.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const { posix: path } = require('path')
55
module.exports = (to, { data: { root } }) => {
66
if (!to) return '#'
77
const from = root.page.url
8-
if (!from || to.charAt() === '#') return to
8+
if (!from || to.charAt() !== '/') return to
99
let hash = ''
1010
const hashIdx = to.indexOf('#')
1111
if (~hashIdx) {

0 commit comments

Comments
 (0)