Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions packages/gatsby/src/utils/api-runner-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,10 @@ module.exports = async (api, args = {}, pluginSource) =>
},
(err, results) => {
if (err) {
reporter.error(`${pluginName} returned an error`, err)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since panicOnBuild doesn't exist, you can do the same thing by adding a conditional if (process.env.NODE_ENV === "production") { /* panic */ } else { /* error */ }

if (process.env.NODE_ENV === `production`) {
return reporter.panic(`${pluginName} returned an error`, err)
}
return reporter.error(`${pluginName} returned an error`, err)
}
// Remove runner instance
apisRunning = apisRunning.filter(runner => runner !== apiRunInstance)
Expand All @@ -181,7 +184,7 @@ module.exports = async (api, args = {}, pluginSource) =>
}

// Check if any of our waiters are done.
waitingForCasacadeToFinish = waitingForCasacadeToFinish.filter(
return waitingForCasacadeToFinish = waitingForCasacadeToFinish.filter(
instance => {
// If none of its trace IDs are running, it's done.
if (!_.some(apisRunning, a => a.traceId === instance.traceId)) {
Expand Down