@@ -74,17 +74,16 @@ export class IncrementalGraph {
74
74
}
75
75
76
76
getNewPending ( ) : ReadonlyArray < SubsequentResultRecord > {
77
- const maybeEmptyNewPending = this . _newPending ;
78
77
const newPending = [ ] ;
79
- for ( const node of maybeEmptyNewPending ) {
78
+ for ( const node of this . _newPending ) {
80
79
if ( isDeferredFragmentRecord ( node ) ) {
81
80
if ( node . expectedReconcilableResults ) {
82
81
this . _pending . add ( node ) ;
83
82
newPending . push ( node ) ;
84
83
continue ;
85
84
}
86
85
for ( const child of node . children ) {
87
- this . _addNonEmptyNewPending ( child , newPending ) ;
86
+ this . _newPending . add ( child ) ;
88
87
}
89
88
} else {
90
89
this . _pending . add ( node ) ;
@@ -188,22 +187,6 @@ export class IncrementalGraph {
188
187
this . _addDeferredFragmentRecord ( parent ) ;
189
188
}
190
189
191
- private _addNonEmptyNewPending (
192
- deferredFragmentRecord : DeferredFragmentRecord ,
193
- newPending : Array < SubsequentResultRecord > ,
194
- ) : void {
195
- if ( deferredFragmentRecord . expectedReconcilableResults ) {
196
- this . _pending . add ( deferredFragmentRecord ) ;
197
- newPending . push ( deferredFragmentRecord ) ;
198
- return ;
199
- }
200
- /* c8 ignore next 5 */
201
- // TODO: add test case for this, if when skipping an empty deferred fragment, the empty fragment has nested children.
202
- for ( const child of deferredFragmentRecord . children ) {
203
- this . _addNonEmptyNewPending ( child , newPending ) ;
204
- }
205
- }
206
-
207
190
private _enqueueCompletedDeferredGroupedFieldSet (
208
191
result : DeferredGroupedFieldSetResult ,
209
192
) : void {
0 commit comments