Skip to content

Commit 20ab1bf

Browse files
committed
Fix error on empty array config
1 parent 4c2ae56 commit 20ab1bf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bin/webpack.js

100644100755
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ function processOptions(options) {
133133
return;
134134
}
135135

136-
var firstOptions = Array.isArray(options) ? options[0] : options;
136+
var firstOptions = Array.isArray(options) ? (options[0] || {}) : options;
137137

138138
if(typeof options.stats === "boolean" || typeof options.stats === "string") {
139139
var statsPresetToOptions = require("../lib/Stats.js").presetToOptions;

0 commit comments

Comments
 (0)