Skip to content

Commit

Permalink
Log error in createPath (#3814)
Browse files Browse the repository at this point in the history
Fix conditional to show error when path or component are missing in the createPath function
  • Loading branch information
monkbroc authored and KyleAMathews committed Feb 2, 2018
1 parent 14c4de6 commit 75bc4e5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/gatsby/src/redux/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ actions.createPage = (page: PageInput, plugin?: Plugin, traceId?: string) => {
if (!page.path) {
const message = `${name} must set the page path when creating a page`
// Don't log out when testing
if (!process.env.NODE_ENV === `test`) {
if (process.env.NODE_ENV !== `test`) {
console.log(chalk.bold.red(message))
console.log(``)
console.log(page)
Expand All @@ -125,7 +125,7 @@ actions.createPage = (page: PageInput, plugin?: Plugin, traceId?: string) => {
if (!page.component || !path.isAbsolute(page.component)) {
const message = `${name} must set the absolute path to the page component when create creating a page`
// Don't log out when testing
if (!process.env.NODE_ENV === `test`) {
if (process.env.NODE_ENV !== `test`) {
console.log(chalk.bold.red(message))
console.log(``)
console.log(page)
Expand Down

0 comments on commit 75bc4e5

Please sign in to comment.