Skip to content

Commit

Permalink
fix(plugins): add undefined to plugin options check (#177)
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-ciniawsky authored Oct 19, 2018
1 parent 003c3d9 commit 4349ea9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ const req = require('import-cwd')
* @return {Function} PostCSS Plugin
*/
const load = (plugin, options, file) => {
if (options === null || Object.keys(options).length === 0) {
if (
options === null ||
options === undefined ||
Object.keys(options).length === 0
) {
try {
return req(plugin)
} catch (err) {
Expand Down

0 comments on commit 4349ea9

Please sign in to comment.