Skip to content

Commit

Permalink
Log error in createPath
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 Feb 2, 2018
1 parent 614cc6c commit 0477847
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 0477847

Please sign in to comment.