fix for theme info

This commit is contained in:
booploops 2022-02-25 18:03:21 -08:00
parent e574b6c6e5
commit bef0132e90

View file

@ -916,10 +916,14 @@ const app = new Vue({
} }
const info = {} const info = {}
try { try {
info = await (await fetch("themes/" + app.cfg.visual.theme.replace("index.less", "theme.json"))).json() const infoResponse = await fetch("themes/" + app.cfg.visual.theme.replace("index.less", "theme.json"))
}catch(e){e=null} this.chrome.appliedTheme.info = await infoResponse.json()
}catch(e){
e=null
console.warn("failed to get theme.json")
this.chrome.appliedTheme.info = {}
}
this.chrome.appliedTheme.info = info
if(!onlyPrefs) { if(!onlyPrefs) {
document.querySelector("#userTheme").href = `themes/${this.cfg.visual.theme}` document.querySelector("#userTheme").href = `themes/${this.cfg.visual.theme}`