Skip to content

Commit

Permalink
Use slice not startsWith as it's poorly supported (#508)
Browse files Browse the repository at this point in the history
Fixes #507
  • Loading branch information
KyleAMathews authored Oct 18, 2016
1 parent f67febc commit 0139b9e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/isomorphic/gatsby-helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const prefixLink = (_link) => {
if (isDataURL(_link)) {
return _link
} else {
if (!_link.startsWith('/')) {
if (_link.slice(0, 1) !== '/') {
return `${config.linkPrefix}/${_link}`
}
return `${config.linkPrefix}${_link}`
Expand Down

0 comments on commit 0139b9e

Please sign in to comment.