Fixed execution of RxJS teardown logic on complete (7.2.3 regression)

This commit is contained in:
squidfunk
2021-08-11 23:44:01 +02:00
parent 281fa3ac91
commit f4b1f97dd0
22 changed files with 88 additions and 55 deletions

View File

@@ -24,6 +24,7 @@ import { NEVER, Observable, Subject, defer, of } from "rxjs"
import {
catchError,
filter,
finalize,
map,
shareReplay,
tap
@@ -117,7 +118,8 @@ export function mountSource(
/* Create and return component */
return watchSource(el)
.pipe(
tap(internal$),
tap(state => internal$.next(state)),
finalize(() => internal$.complete()),
map(state => ({ ref: el, ...state }))
)
}