@@ -74,17 +74,16 @@ export class IncrementalGraph {
7474 }
7575
7676 getNewPending ( ) : ReadonlyArray < SubsequentResultRecord > {
77- const maybeEmptyNewPending = this . _newPending ;
7877 const newPending = [ ] ;
79- for ( const node of maybeEmptyNewPending ) {
78+ for ( const node of this . _newPending ) {
8079 if ( isDeferredFragmentRecord ( node ) ) {
8180 if ( node . expectedReconcilableResults ) {
8281 this . _pending . add ( node ) ;
8382 newPending . push ( node ) ;
8483 continue ;
8584 }
8685 for ( const child of node . children ) {
87- this . _addNonEmptyNewPending ( child , newPending ) ;
86+ this . _newPending . add ( child ) ;
8887 }
8988 } else {
9089 this . _pending . add ( node ) ;
@@ -188,22 +187,6 @@ export class IncrementalGraph {
188187 this . _addDeferredFragmentRecord ( parent ) ;
189188 }
190189
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-
207190 private _enqueueCompletedDeferredGroupedFieldSet (
208191 result : DeferredGroupedFieldSetResult ,
209192 ) : void {
0 commit comments