Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 68b80bd

Browse files
committed
Merge pull request webpack#2383 from sharang-d/fix/empty-config-array
Fix error on empty array config
2 parents 8c1d7a9 + 20ab1bf commit 68b80bd

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)