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 @@ -82,13 +82,6 @@ export class FetchBackend implements HttpBackend {
8282 inject ( FetchFactory , { optional : true } ) ?. fetch ?? ( ( ...args ) => globalThis . fetch ( ...args ) ) ;
8383 private readonly ngZone = inject ( NgZone ) ;
8484 private readonly destroyRef = inject ( DestroyRef ) ;
85- private destroyed = false ;
86-
87- constructor ( ) {
88- this . destroyRef . onDestroy ( ( ) => {
89- this . destroyed = true ;
90- } ) ;
91- }
9285
9386 handle ( request : HttpRequest < any > ) : Observable < HttpEvent < any > > {
9487 return new Observable ( ( observer ) => {
@@ -193,7 +186,7 @@ export class FetchBackend implements HttpBackend {
193186 // unnecessary work or triggering side effects after teardown.
194187 // This may happen if the app was explicitly destroyed before
195188 // the response returned entirely.
196- if ( this . destroyed ) {
189+ if ( this . destroyRef . destroyed ) {
197190 // Streams left in a pending state (due to `break` without cancel) may
198191 // continue consuming or holding onto data behind the scenes.
199192 // Calling `reader.cancel()` allows the browser or the underlying
You can’t perform that action at this time.
0 commit comments