From 58dd5d31735dd801cba43c87700f4d6144203c75 Mon Sep 17 00:00:00 2001 From: Sresan Thevarajah Date: Mon, 24 Apr 2017 11:55:31 -0700 Subject: [PATCH] fix: add a not null check for the content property before throwing error (#404) --- index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index e6e12b23..cf734f7d 100644 --- a/index.js +++ b/index.js @@ -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();