Skip to content

Commit

Permalink
fix 'Cannot read property 'posthtml' of null (#1578)
Browse files Browse the repository at this point in the history
fixes #1574
  • Loading branch information
ranfdev authored and Jasper De Moor committed Jun 18, 2018
1 parent 1701f9b commit c94624e
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/transforms/posthtml.js
Expand Up @@ -25,13 +25,12 @@ async function transform(asset) {
}

async function getConfig(asset) {
let config =
(await asset.getPackage()).posthtml ||
(await asset.getConfig([
'.posthtmlrc',
'.posthtmlrc.js',
'posthtml.config.js'
]));
let config = await asset.getConfig(
['.posthtmlrc', '.posthtmlrc.js', 'posthtml.config.js'],
{
packageKey: 'posthtml'
}
);
if (!config && !asset.options.minify) {
return;
}
Expand Down

0 comments on commit c94624e

Please sign in to comment.