Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 2 commits into from May 10, 2019

Conversation

ChristianKohler
Copy link
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

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.

None yet

3 participants