Skip to content

fix(Subscription): Return Empty when teardown === null - #4575

Merged
benlesh merged 2 commits into
ReactiveX:masterfrom
ChristianKohler:master
May 10, 2019
Merged

benlesh merged 2 commits into
ReactiveX:masterfrom
ChristianKohler:master

Conversation

@ChristianKohler

Copy link
Copy Markdown
Contributor

Description:
Subscription.add breaks if teardown function is null. (works with undefined)

typeof teardown returns object when null. It breaks later when rxjs tries to access the closed property.

The commit fixes that by first checking for null/undefined.

Related issue (if exists):
Haven't found an issue

ChristianKohler and others added 2 commits February 18, 2019 14:25
`typeof teardown` returns object when null. It breaks later when rxjs tries to access the closed property.

The commit fixes that by first checking for null/undefined.
@coveralls

Copy link
Copy Markdown

Pull Request Test Coverage Report for Build 8105

  • 2 of 2 (100.0%) changed or added relevant lines in 1 file are covered.
  • 6 unchanged lines in 4 files lost coverage.
  • Overall coverage increased (+0.2%) to 96.962%

Files with Coverage Reduction New Missed Lines %
src/internal/Subscription.ts 1 93.38%
src/internal/observable/fromPromise.ts 1 87.5%
src/internal/observable/fromIterable.ts 2 95.24%
src/internal/observable/fromObservable.ts 2 83.33%
Totals Coverage Status
Change from base Build 8098: 0.2%
Covered Lines: 5777
Relevant Lines: 5958

💛 - Coveralls

@benlesh
benlesh merged commit ffc4e68 into ReactiveX:master May 10, 2019
BioPhoton pushed a commit to BioPhoton/rxjs that referenced this pull request May 15, 2019
* fix(Subscription): Return Empty when teardown === null

`typeof teardown` returns object when null. It breaks later when rxjs tries to access the closed property.

The commit fixes that by first checking for null/undefined.

* fix(Subscription): tslint errors
@lock lock Bot locked as resolved and limited conversation to collaborators Jun 9, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants