Skip to content

Commit ac1a25d

Browse files
authored
allow passing a single options object to a MultiCompiler
1 parent b4edb67 commit ac1a25d

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

lib/MultiCompiler.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,13 +119,10 @@ MultiCompiler.prototype.watch = function(watchOptions, handler) {
119119
var compilerStatus = this.compilers.map(function() {
120120
return false;
121121
});
122-
if(!Array.isArray(watchOptions)) {
123-
watchOptions = [watchOptions];
124-
}
125122
runWithDependencies(this.compilers, function(compiler, callback) {
126123
var compilerIdx = this.compilers.indexOf(compiler);
127124
var firstRun = true;
128-
var watching = compiler.watch(watchOptions[compilerIdx], function(err, stats) {
125+
var watching = compiler.watch(Array.isArray(watchOptions) ? watchOptions[compilerIdx] : watchOptions, function(err, stats) {
129126
if(err)
130127
handler(err);
131128
if(stats) {

0 commit comments

Comments
 (0)