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

@@ -31,6 +31,7 @@ import {
} from "rxjs"
import {
distinctUntilKeyChanged,
finalize,
map,
switchMap,
tap,
@@ -175,7 +176,8 @@ export function mountCodeBlock(
/* Create and return component */
return watchCodeBlock(el, options)
.pipe(
tap(internal$),
tap(state => internal$.next(state)),
finalize(() => internal$.complete()),
map(state => ({ ref: el, ...state }))
)
}