Fixed instant loading not correctly updating page title

This commit is contained in:
squidfunk
2020-10-31 14:29:20 +01:00
parent 3441834059
commit 87b706f19e
7 changed files with 10 additions and 11 deletions

View File

@@ -32,8 +32,7 @@ import {
sample,
share,
skip,
switchMap,
withLatestFrom
switchMap
} from "rxjs/operators"
import {
@@ -221,11 +220,11 @@ export function setupInstantLoading(
})
/* Replace document metadata */
instant$
document$
.pipe(
withLatestFrom(document$)
skip(1) // Skip initial
)
.subscribe(([, { title, head }]) => {
.subscribe(({ title, head }) => {
document.title = title
/* Replace meta tags */