mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-22 12:01:23 +01:00
chore: pump version
This commit is contained in:
parent
377f03daca
commit
e4064f249b
3 changed files with 16 additions and 19 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue