Skip to content

Commit cac358f

Browse files
committed
Merge pull request gulpjs#64 from alexeyraspopov/master
Arguments object can be used in apply method without converting to array
2 parents 9444ffb + 15d47b7 commit cac358f

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

index.js

+1-5
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,8 @@ util.inherits(Gulp, Orchestrator);
1515
Gulp.prototype.taskQueue = Gulp.prototype.seq;
1616
Gulp.prototype.task = Gulp.prototype.add;
1717
Gulp.prototype.run = function(){
18-
var tasks = Array.prototype.slice.call(arguments);
19-
2018
// impose our opinion of "default" tasks onto orchestrator
21-
if (!tasks.length) {
22-
tasks = ['default'];
23-
}
19+
var tasks = arguments.length ? arguments : ['default'];
2420
this.start.apply(this, tasks);
2521
};
2622

0 commit comments

Comments
 (0)