summaryrefslogtreecommitdiff
path: root/tools/node_modules/eslint/node_modules/rxjs/internal/operators/expand.js
diff options
context:
space:
mode:
Diffstat (limited to 'tools/node_modules/eslint/node_modules/rxjs/internal/operators/expand.js')
-rw-r--r--tools/node_modules/eslint/node_modules/rxjs/internal/operators/expand.js10
1 files changed, 7 insertions, 3 deletions
diff --git a/tools/node_modules/eslint/node_modules/rxjs/internal/operators/expand.js b/tools/node_modules/eslint/node_modules/rxjs/internal/operators/expand.js
index b5d4e4b816..f615199a6b 100644
--- a/tools/node_modules/eslint/node_modules/rxjs/internal/operators/expand.js
+++ b/tools/node_modules/eslint/node_modules/rxjs/internal/operators/expand.js
@@ -73,7 +73,8 @@ var ExpandSubscriber = (function (_super) {
}
else {
var state = { subscriber: this, result: result, value: value, index: index };
- this.add(this.scheduler.schedule(ExpandSubscriber.dispatch, 0, state));
+ var destination_1 = this.destination;
+ destination_1.add(this.scheduler.schedule(ExpandSubscriber.dispatch, 0, state));
}
}
else {
@@ -82,20 +83,23 @@ var ExpandSubscriber = (function (_super) {
};
ExpandSubscriber.prototype.subscribeToProjection = function (result, value, index) {
this.active++;
- this.add(subscribeToResult_1.subscribeToResult(this, result, value, index));
+ var destination = this.destination;
+ destination.add(subscribeToResult_1.subscribeToResult(this, result, value, index));
};
ExpandSubscriber.prototype._complete = function () {
this.hasCompleted = true;
if (this.hasCompleted && this.active === 0) {
this.destination.complete();
}
+ this.unsubscribe();
};
ExpandSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {
this._next(innerValue);
};
ExpandSubscriber.prototype.notifyComplete = function (innerSub) {
var buffer = this.buffer;
- this.remove(innerSub);
+ var destination = this.destination;
+ destination.remove(innerSub);
this.active--;
if (buffer && buffer.length > 0) {
this._next(buffer.shift());