Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

Commit

Permalink
fix: add a not null check for the content property before throwing er…
Browse files Browse the repository at this point in the history
…ror (#404)
  • Loading branch information
sresant authored and michael-ciniawsky committed Apr 24, 2017
1 parent 6c50d8e commit 58dd5d3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,8 @@ ExtractTextPlugin.prototype.apply = function(compiler) {
return callback();
}
meta = module[NS];
if(!Array.isArray(meta.content)) {
// Error out if content is not an array and is not null
if(!Array.isArray(meta.content) && meta.content != null) {
err = new Error(module.identifier() + " doesn't export content");
compilation.errors.push(err);
return callback();
Expand Down

0 comments on commit 58dd5d3

Please sign in to comment.