Skip to content

Commit

Permalink
fix: Do not log error message when config is missing (#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 Kent C. Dodds committed Nov 22, 2019
1 parent 800a12d commit a3c0e23
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/index.js
Expand Up @@ -294,17 +294,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 a3c0e23

Please sign in to comment.