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

@@ -30,6 +30,7 @@ import {
bufferCount,
distinctUntilChanged,
distinctUntilKeyChanged,
finalize,
map,
observeOn,
scan,
@@ -267,7 +268,8 @@ export function mountTableOfContents(
const anchors = getElements<HTMLAnchorElement>("[href^=\\#]", el)
return watchTableOfContents(anchors, options)
.pipe(
tap(internal$),
tap(state => internal$.next(state)),
finalize(() => internal$.complete()),
map(state => ({ ref: el, ...state }))
)
}