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

Commit 58dd5d3

Browse files
sresantmichael-ciniawsky
authored andcommitted
fix: add a not null check for the content property before throwing error (#404)
1 parent 6c50d8e commit 58dd5d3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,8 @@ ExtractTextPlugin.prototype.apply = function(compiler) {
277277
return callback();
278278
}
279279
meta = module[NS];
280-
if(!Array.isArray(meta.content)) {
280+
// Error out if content is not an array and is not null
281+
if(!Array.isArray(meta.content) && meta.content != null) {
281282
err = new Error(module.identifier() + " doesn't export content");
282283
compilation.errors.push(err);
283284
return callback();

0 commit comments

Comments
 (0)