Skip to content

useDeprecatedSynchronousErrorHandling not calling teardown if synchronously unsubscribed #6364

@benlesh

Description

@benlesh

Found in google3 (of course, haha) cc @leggechr

import { Observable, config } from "rxjs";

config.useDeprecatedSynchronousErrorHandling = true;

let called = false;
const observable = new Observable(obs => () => (called = true));
const subscription = observable.subscribe();
subscription.unsubscribe();

console.log("called: ", called); // logs called: false

https://stackblitz.com/edit/rxjs-4stiyw?devtoolsheight=60

Metadata

Metadata

Assignees

Labels

7.xIssues and PRs for version 7.xbugConfirmed bug

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions