Skip to content

Commit

Permalink
validate if a postCSS config is an object (#1862)
Browse files Browse the repository at this point in the history
  • Loading branch information
DeMoorJasper committed Aug 16, 2018
1 parent e31f0fd commit c4dc892
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/core/parcel/src/transforms/postcss.js
Expand Up @@ -29,6 +29,11 @@ async function getConfig(asset) {
}

config = config || {};

if (typeof config !== 'object') {
throw new Error('PostCSS config should be an object.');
}

let postcssModulesConfig = {
getJSON: (filename, json) => (asset.cssModules = json)
};
Expand Down

0 comments on commit c4dc892

Please sign in to comment.