File tree 1 file changed +8
-5
lines changed
1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -110,11 +110,12 @@ module.exports = (plan, limit) => {
110
110
}
111
111
// Write down new plan
112
112
const newPlan = new Map ( ) ;
113
- for ( const node of treeMap . values ( ) ) {
114
- if ( ! node . active ) continue ;
113
+ for ( const rootNode of treeMap . values ( ) ) {
114
+ if ( ! rootNode . active ) continue ;
115
115
const map = new Map ( ) ;
116
- const queue = new Set ( [ node ] ) ;
116
+ const queue = new Set ( [ rootNode ] ) ;
117
117
for ( const node of queue ) {
118
+ if ( node . active && node !== rootNode ) continue ;
118
119
if ( node . value ) {
119
120
if ( Array . isArray ( node . value ) ) {
120
121
for ( const item of node . value ) {
@@ -125,10 +126,12 @@ module.exports = (plan, limit) => {
125
126
}
126
127
}
127
128
if ( node . children ) {
128
- for ( const child of node . children ) queue . add ( child ) ;
129
+ for ( const child of node . children ) {
130
+ queue . add ( child ) ;
131
+ }
129
132
}
130
133
}
131
- newPlan . set ( node . filePath , map ) ;
134
+ newPlan . set ( rootNode . filePath , map ) ;
132
135
}
133
136
return newPlan ;
134
137
} ;
You can’t perform that action at this time.
0 commit comments