Try to fix theme race condition

Does rather beg the question why we use rc.fetchText at all
This commit is contained in:
Oliver Blanthorn 2025-12-01 13:44:34 +01:00
parent 1606193bd6
commit 4d196fd88f
No known key found for this signature in database
GPG key ID: 2BB8C36BB504BFF3

View file

@ -543,7 +543,7 @@ export async function colourscheme(...args: string[]) {
if (themename === undefined) throw new Error(`You must provide a theme name!`)
if (url === "%") url = window.location.href // this is basically an easter egg
if (!(url.startsWith("http://") || url.startsWith("https://"))) url = "http://" + url
const css = await rc.fetchText(url)
const css = await (await fetch(url)).text()
set("customthemes." + themename, css)
} else {
await loadtheme(themename)