Skip to content
This repository has been archived by the owner on Dec 9, 2019. It is now read-only.

Commit

Permalink
fix: Do not log error message when config is missing (kentcdodds#136)
Browse files Browse the repository at this point in the history
* Do not log error message when no config is added

* update snapshots

* update snapshots (bis)
  • Loading branch information
lucleray authored and pull[bot] committed Nov 22, 2019
1 parent 24796b1 commit 04f1aa4
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -297,17 +297,16 @@ function getConfig(macro, filename, source, options) {

if (
optionsConfig.options === undefined &&
fileConfig.options === undefined
fileConfig.options === undefined &&
fileConfig.error !== undefined
) {
// eslint-disable-next-line no-console
console.error(
`There was an error trying to load the config "${configName}" ` +
`for the macro imported from "${source}. ` +
`Please see the error thrown for more information.`,
)
if (fileConfig.error !== undefined) {
throw fileConfig.error
}
throw fileConfig.error
}

if (
Expand Down

0 comments on commit 04f1aa4

Please sign in to comment.