Skip to content

Commit

Permalink
fix(gatsby-plugin-offline): prevent caching invalid relative paths (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
vtenfys authored and GatsbyJS Bot committed Sep 5, 2019
1 parent 49bf3f8 commit 19ee175
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ module.exports = (htmlPath, pathPrefix) => {

// check resource URLs from header tags start with the correct prefix
// (these are not page URLs)
if (!blackListRegex.test(url) && url.startsWith(pathPrefix)) {
if (!blackListRegex.test(url) && url.startsWith(`${pathPrefix}/`)) {
criticalFilePaths.push(url.replace(/^\//, ``))
}
})
Expand Down

0 comments on commit 19ee175

Please sign in to comment.