File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -350,7 +350,7 @@ function executeImpl(
350
350
( data ) => {
351
351
const initialResult = buildResponse ( data , exeContext . errors ) ;
352
352
const publisher = exeContext . publisher ;
353
- if ( publisher . subsequentPayloads . size > 0 ) {
353
+ if ( publisher . hasNext ( ) ) {
354
354
return {
355
355
initialResult : {
356
356
...initialResult ,
@@ -369,7 +369,7 @@ function executeImpl(
369
369
}
370
370
const initialResult = buildResponse ( result , exeContext . errors ) ;
371
371
const publisher = exeContext . publisher ;
372
- if ( publisher . subsequentPayloads . size > 0 ) {
372
+ if ( publisher . hasNext ( ) ) {
373
373
return {
374
374
initialResult : {
375
375
...initialResult ,
Original file line number Diff line number Diff line change @@ -32,6 +32,10 @@ export class Publisher {
32
32
this . subsequentPayloads . add ( payload ) ;
33
33
}
34
34
35
+ hasNext ( ) : boolean {
36
+ return this . subsequentPayloads . size > 0 ;
37
+ }
38
+
35
39
filter ( predicate : ( payload : AsyncPayloadRecord ) => boolean ) : void {
36
40
this . subsequentPayloads . forEach ( ( asyncRecord ) => {
37
41
if ( predicate ( asyncRecord ) ) {
You can’t perform that action at this time.
0 commit comments