From 0477847933784b49cf779d58c528b1b10fc7d4df Mon Sep 17 00:00:00 2001 From: Julien Vanier Date: Thu, 1 Feb 2018 22:15:38 -0500 Subject: [PATCH] Log error in createPath Fix conditional to show error when path or component are missing in the createPath function --- packages/gatsby/src/redux/actions.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/gatsby/src/redux/actions.js b/packages/gatsby/src/redux/actions.js index 3e4a451ef32b6..5cdc6be8c9ca5 100644 --- a/packages/gatsby/src/redux/actions.js +++ b/packages/gatsby/src/redux/actions.js @@ -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) @@ -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)