File tree Expand file tree Collapse file tree 2 files changed +1
-9
lines changed
goldens/public-api/common/http Expand file tree Collapse file tree 2 files changed +1
-9
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,6 @@ import { WritableResource } from '@angular/core';
1919
2020// @public
2121export class FetchBackend implements HttpBackend {
22- constructor ();
2322 // (undocumented)
2423 handle(request : HttpRequest <any >): Observable <HttpEvent <any >>;
2524 // (undocumented)
Original file line number Diff line number Diff line change @@ -63,13 +63,6 @@ export class FetchBackend implements HttpBackend {
6363 inject ( FetchFactory , { optional : true } ) ?. fetch ?? ( ( ...args ) => globalThis . fetch ( ...args ) ) ;
6464 private readonly ngZone = inject ( NgZone ) ;
6565 private readonly destroyRef = inject ( DestroyRef ) ;
66- private destroyed = false ;
67-
68- constructor ( ) {
69- this . destroyRef . onDestroy ( ( ) => {
70- this . destroyed = true ;
71- } ) ;
72- }
7366
7467 handle ( request : HttpRequest < any > ) : Observable < HttpEvent < any > > {
7568 return new Observable ( ( observer ) => {
@@ -174,7 +167,7 @@ export class FetchBackend implements HttpBackend {
174167 // unnecessary work or triggering side effects after teardown.
175168 // This may happen if the app was explicitly destroyed before
176169 // the response returned entirely.
177- if ( this . destroyed ) {
170+ if ( this . destroyRef . destroyed ) {
178171 // Streams left in a pending state (due to `break` without cancel) may
179172 // continue consuming or holding onto data behind the scenes.
180173 // Calling `reader.cancel()` allows the browser or the underlying
You can’t perform that action at this time.
0 commit comments