Skip to content
Permalink
Browse files

fix(gatsby-ssr): filtering out links that begin with the /page-data/ …

…directory
  • Loading branch information
itmayziii committed Oct 1, 2019
1 parent 96c3001 commit 7b7f5a4824d8e1f03c27e650fe4802cfe839dadc
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/gatsby-ssr.ts
@@ -65,8 +65,9 @@ function getHeadComponentsNoJS (headComponents: ReactNode[], pluginOptions: Plug
return true
}

// Gatsby puts JSON files in the head that should also be removed if javascript is removed, all these Gatsby files are in the "/static" directory.
if (headComponent.props.href && headComponent.props.href.startsWith('/static/')) {
// Gatsby puts JSON files in the head that should also be removed if javascript is removed, all these Gatsby files are in the
// "/static" or /page-data directories.
if (headComponent.props.href && (headComponent.props.href.startsWith('/static/') || headComponent.props.href.startsWith('/page-data/'))) {
return false
}

0 comments on commit 7b7f5a4

Please sign in to comment.
You can’t perform that action at this time.