Skip to content
This repository was archived by the owner on Apr 20, 2018. It is now read-only.

Commit b6e1b5c

Browse files
committed
* Removed unnecessary code.
* Simplified return values
1 parent 6b57fff commit b6e1b5c

1 file changed

Lines changed: 7 additions & 8 deletions

File tree

src/core/backpressure/controlled.js

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -80,16 +80,15 @@
8080
else { this.disposeCurrentRequest(); this.queue = []; }
8181
}
8282

83-
return this.queue.length !== 0 ?
84-
{ numberOfItems: numberOfItems, returnValue: true } :
85-
{ numberOfItems: numberOfItems, returnValue: false };
83+
return { numberOfItems : numberOfItems, returnValue: this.queue.length !== 0};
8684
}
8785

88-
if (this.hasFailed) {
89-
this.subject.onError(this.error);
90-
} else if (this.hasCompleted) {
91-
this.subject.onCompleted();
92-
}
86+
//TODO I don't think this is ever necessary, since termination of a sequence without a queue occurs in the onCompletion or onError function
87+
//if (this.hasFailed) {
88+
// this.subject.onError(this.error);
89+
//} else if (this.hasCompleted) {
90+
// this.subject.onCompleted();
91+
//}
9392

9493
return { numberOfItems: numberOfItems, returnValue: false };
9594
},

0 commit comments

Comments
 (0)