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

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,6 +1,6 @@
{
"assets/javascripts/bundle.js": "assets/javascripts/bundle.4b42b5e6.min.js",
"assets/javascripts/bundle.js.map": "assets/javascripts/bundle.4b42b5e6.min.js.map",
"assets/javascripts/bundle.js": "assets/javascripts/bundle.e0c867e5.min.js",
"assets/javascripts/bundle.js.map": "assets/javascripts/bundle.e0c867e5.min.js.map",
"assets/javascripts/vendor.js": "assets/javascripts/vendor.a018d6bb.min.js",
"assets/javascripts/vendor.js.map": "assets/javascripts/vendor.a018d6bb.min.js.map",
"assets/javascripts/worker/search.js": "assets/javascripts/worker/search.4ac00218.min.js",

View File

@ -173,7 +173,7 @@
</div>
{% block scripts %}
<script src="{{ 'assets/javascripts/vendor.a018d6bb.min.js' | url }}"></script>
<script src="{{ 'assets/javascripts/bundle.4b42b5e6.min.js' | url }}"></script>
<script src="{{ 'assets/javascripts/bundle.e0c867e5.min.js' | url }}"></script>
{%- set translations = {} -%}
{%- for key in [
"clipboard.copy",

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 */