Skip to content

Commit 75bc4e5

Browse files
monkbrocKyleAMathews
authored andcommitted
Log error in createPath (#3814)
Fix conditional to show error when path or component are missing in the createPath function
1 parent 14c4de6 commit 75bc4e5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/gatsby/src/redux/actions.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ actions.createPage = (page: PageInput, plugin?: Plugin, traceId?: string) => {
112112
if (!page.path) {
113113
const message = `${name} must set the page path when creating a page`
114114
// Don't log out when testing
115-
if (!process.env.NODE_ENV === `test`) {
115+
if (process.env.NODE_ENV !== `test`) {
116116
console.log(chalk.bold.red(message))
117117
console.log(``)
118118
console.log(page)
@@ -125,7 +125,7 @@ actions.createPage = (page: PageInput, plugin?: Plugin, traceId?: string) => {
125125
if (!page.component || !path.isAbsolute(page.component)) {
126126
const message = `${name} must set the absolute path to the page component when create creating a page`
127127
// Don't log out when testing
128-
if (!process.env.NODE_ENV === `test`) {
128+
if (process.env.NODE_ENV !== `test`) {
129129
console.log(chalk.bold.red(message))
130130
console.log(``)
131131
console.log(page)

0 commit comments

Comments
 (0)