mirror of
https://github.com/squidfunk/mkdocs-material.git
synced 2026-07-23 06:13:38 -04:00
Fixed invalid versions.json URL (regression)
This commit is contained in:
@@ -96,7 +96,7 @@ export interface Config {
|
||||
*/
|
||||
const script = getElementOrThrow("#__config")
|
||||
const config: Config = JSON.parse(script.textContent!)
|
||||
config.base = new URL(config.base, getLocation()).toString()
|
||||
config.base = `${new URL(config.base, getLocation())}`
|
||||
|
||||
/* ----------------------------------------------------------------------------
|
||||
* Functions
|
||||
|
||||
@@ -33,7 +33,7 @@ import { Version, renderVersionSelector } from "~/templates"
|
||||
*/
|
||||
export function setupVersionSelector(): void {
|
||||
const config = configuration()
|
||||
requestJSON<Version[]>(new URL("versions.json", config.base))
|
||||
requestJSON<Version[]>(new URL("../versions.json", config.base))
|
||||
.subscribe(versions => {
|
||||
const topic = getElementOrThrow(".md-header__topic")
|
||||
topic.appendChild(renderVersionSelector(versions))
|
||||
|
||||
Reference in New Issue
Block a user