Skip to content

Commit

Permalink
fix: browser-support using function instead of arrow fn (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ezedl authored and wardpeet committed Dec 12, 2019
1 parent 5e10163 commit e14e260
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/GatsbyStaticSitePlugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ module.exports = class GatsbyStaticSitePlugin {
// Add our own navigation function to gatsby
parser.state.current.addDependency(
new ConstDependency(
`const ${name} = (url, options) => {
`function ${name}(url, options) {
// when we do not replace the current url or the replacement is just adding a slash we navigate
// this fixes canonical redirects
if (!options.replace || window.location.href + '/' === url) {
Expand Down

0 comments on commit e14e260

Please sign in to comment.