diff --git a/lib/isomorphic/gatsby-helpers.js b/lib/isomorphic/gatsby-helpers.js index 2a1b7516f8881..8a5c7dde5d12e 100644 --- a/lib/isomorphic/gatsby-helpers.js +++ b/lib/isomorphic/gatsby-helpers.js @@ -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}`