Commit 38d236e2 authored by Naoyuki Kanezawa's avatar Naoyuki Kanezawa Committed by Tim Neutkens

fix prefetching relative path (#1151)

parent db97fbff
......@@ -82,7 +82,9 @@ export default class Link extends Component {
// Prefetch the JSON page if asked (only in the client)
if (prefetch) {
if (typeof window !== 'undefined') {
Router.prefetch(props.href)
const { pathname } = window.location
const href = resolve(pathname, props.href)
Router.prefetch(href)
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment