chore: pump version

This commit is contained in:
Azgaar 2023-11-19 05:08:12 +04:00
parent 377f03daca
commit e4064f249b
3 changed files with 16 additions and 19 deletions

View file

@ -62,15 +62,12 @@ async function getStylePreset(desiredPreset) {
}
async function fetchSystemPreset(preset) {
const style = await fetch(`./styles/${preset}.json`)
.then(res => res.json())
.catch(err => {
ERROR && console.error("Error on loading style preset", preset, err);
return null;
});
if (!style) throw new Error("Cannot fetch style preset", preset);
return style;
try {
const res = await fetch(`./styles/${preset}.json`);
return await res.json();
} catch (err) {
throw new Error("Cannot fetch style preset", preset);
}
}
function applyStyle(style) {