Skip to content

Commit

Permalink
fix(gatsby-plugin-image): do not return from preprocessSource if noth…
Browse files Browse the repository at this point in the history
…ing is changed (#28678) (#28745)

(cherry picked from commit 9a49286)

Co-authored-by: Vladimir Razuvaev <vladimir.razuvaev@gmail.com>
  • Loading branch information
GatsbyJS Bot and vladar committed Dec 23, 2020
1 parent 0b8ea51 commit 2864af9
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ export async function preprocessSource({
store,
createNodeId,
actions: { createNode },
}: PreprocessSourceArgs): Promise<string> {
}: PreprocessSourceArgs): Promise<void> {
if (
!contents.includes(`StaticImage`) ||
!contents.includes(`gatsby-plugin-image`) ||
!extensions.includes(path.extname(filename))
) {
return contents
return
}
const root = store.getState().program.directory

Expand All @@ -43,5 +43,5 @@ export async function preprocessSource({
createNode,
})

return contents
return
}

0 comments on commit 2864af9

Please sign in to comment.