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

fix: add a not null check for the content property before throwing error #404

Merged
merged 3 commits into from
Apr 24, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,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