mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2026-07-22 22:03:35 -04:00
Fixed handling of 4xx status codes when using instant loading
This commit is contained in:
@@ -21,7 +21,9 @@
|
||||
*/
|
||||
|
||||
import {
|
||||
EMPTY,
|
||||
Observable,
|
||||
catchError,
|
||||
defaultIfEmpty,
|
||||
map,
|
||||
of,
|
||||
@@ -97,6 +99,7 @@ export function fetchSitemap(base?: URL): Observable<Sitemap> {
|
||||
map(sitemap => preprocess(getElements("loc", sitemap)
|
||||
.map(node => node.textContent!)
|
||||
)),
|
||||
catchError(() => EMPTY), // @todo refactor instant loading
|
||||
defaultIfEmpty([]),
|
||||
tap(sitemap => __md_set("__sitemap", sitemap, sessionStorage, base))
|
||||
)
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
import {
|
||||
EMPTY,
|
||||
Subject,
|
||||
catchError,
|
||||
combineLatest,
|
||||
filter,
|
||||
fromEvent,
|
||||
@@ -73,6 +74,9 @@ export function setupVersionSelector(
|
||||
const versions$ = requestJSON<Version[]>(
|
||||
new URL("../versions.json", config.base)
|
||||
)
|
||||
.pipe(
|
||||
catchError(() => EMPTY) // @todo refactor instant loading
|
||||
)
|
||||
|
||||
/* Determine current version */
|
||||
const current$ = versions$
|
||||
|
||||
Reference in New Issue
Block a user