Skip to content

Commit d946611

Browse files
committed
Forward returnNewGenerator when composing with more than 1 generator.
1 parent 44d86a3 commit d946611

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1094,7 +1094,9 @@ class Generator extends EventEmitter {
10941094
let instantiatedGenerator;
10951095

10961096
if (Array.isArray(generator)) {
1097-
const generators = generator.map(gen => this.composeWith(gen, options));
1097+
const generators = generator.map(gen =>
1098+
this.composeWith(gen, options, returnNewGenerator)
1099+
);
10981100
return returnCompose(generators);
10991101
}
11001102

0 commit comments

Comments
 (0)