File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
packages/angular_devkit/schematics/src/rules Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -35,8 +35,14 @@ export function empty(): Source {
35
35
export function chain ( rules : Iterable < Rule > | AsyncIterable < Rule > ) : Rule {
36
36
return async ( initialTree , context ) => {
37
37
let intermediateTree : Observable < Tree > | undefined ;
38
- for await ( const rule of rules ) {
39
- intermediateTree = callRule ( rule , intermediateTree ?? initialTree , context ) ;
38
+ if ( Symbol . asyncIterator in rules ) {
39
+ for await ( const rule of rules ) {
40
+ intermediateTree = callRule ( rule , intermediateTree ?? initialTree , context ) ;
41
+ }
42
+ } else {
43
+ for ( const rule of rules ) {
44
+ intermediateTree = callRule ( rule , intermediateTree ?? initialTree , context ) ;
45
+ }
40
46
}
41
47
42
48
return ( ) => intermediateTree ;
You can’t perform that action at this time.
0 commit comments