mirror of
https://github.com/tridactyl/tridactyl.git
synced 2026-09-10 07:16:33 -04:00
Try to fix theme race condition
Does rather beg the question why we use rc.fetchText at all
This commit is contained in:
parent
1606193bd6
commit
4d196fd88f
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue