Skip to content

Commit

Permalink
Merge branch 'davewasmer-patch-1'
Browse files Browse the repository at this point in the history
  • Loading branch information
adamwathan committed May 5, 2020
2 parents cc409dc + 9d6e8bc commit a15da3e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/lib/substituteVariantsAtRules.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@ export default function(config, { variantGenerators: pluginVariantGenerators })
}

_.forEach(_.without(ensureIncludesDefault(variants), 'responsive'), variant => {
if (!variantGenerators[variant]) {
throw new Error(
`Your config mentions the "${variant}" variant, but "${variant}" doesn't appear to be a variant. Did you forget or misconfigure a plugin that supplies that variant?`
)
}
variantGenerators[variant](atRule, config)
})

Expand Down

0 comments on commit a15da3e

Please sign in to comment.