Skip to content

Commit 20ef785

Browse files
trxcllntbenlesh
authored andcommitted
fix(expand): Fix expand to stay open until the source Observable completes.
1 parent 4ad6797 commit 20ef785

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

spec/operators/expand-spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ describe('Observable.prototype.expand()', function () {
1111
d: 4 + 4, // c + c,
1212
e: 8 + 8, // d + d
1313
}
14-
var e1 = hot('a', values);
14+
var e1 = hot('(a|)', values);
1515
/*
1616
expectation explanation: (conjunction junction?) ...
1717
@@ -44,7 +44,7 @@ describe('Observable.prototype.expand()', function () {
4444
d: 4 + 4, // c + c,
4545
e: 8 + 8, // d + d
4646
}
47-
var e1 = hot('a', values);
47+
var e1 = hot('(a|)', values);
4848
var expected = '(abcde|)';
4949

5050
expectObservable(e1.expand(function(x) {

src/operators/expand.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class ExpandOperator<T, R> implements Operator<T, R> {
2929
class ExpandSubscriber<T, R> extends Subscriber<T> {
3030
private index: number = 0;
3131
private active: number = 0;
32-
private hasCompleted: boolean = true;
32+
private hasCompleted: boolean = false;
3333
private buffer: T[];
3434

3535
constructor(destination: Observer<T>, private project: (value: T, index: number) => Observable<R>,

0 commit comments

Comments
 (0)