Skip to content

Commit

Permalink
Fixed link prefix for URLs without leading slash (#474)
Browse files Browse the repository at this point in the history
  • Loading branch information
Siddharth Jain authored and KyleAMathews committed Sep 26, 2016
1 parent b68fd17 commit 25aaeb7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/isomorphic/gatsby-helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ const prefixLink = (_link) => {
if (isDataURL(_link)) {
return _link
} else {
return config.linkPrefix + _link
if (!_link.startsWith('/')) {
return `${config.linkPrefix}/${_link}`
}
return `${config.linkPrefix}${_link}`
}
} else {
return _link
Expand Down

0 comments on commit 25aaeb7

Please sign in to comment.