mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 01:41:22 +01:00
fix: cannot create undefined style
This commit is contained in:
parent
7bcac7a7d1
commit
6d5c109d78
1 changed files with 3 additions and 2 deletions
|
|
@ -1126,8 +1126,9 @@ function addStylePreset() {
|
||||||
position: {my: "center", at: "center", of: "svg"}
|
position: {my: "center", at: "center", of: "svg"}
|
||||||
});
|
});
|
||||||
|
|
||||||
const currentStyle = document.getElementById("stylePreset").selectedOptions[0].text;
|
const currentPreset = document.getElementById("stylePreset").selectedOptions[0];
|
||||||
document.getElementById("styleSaverName").value = currentStyle;
|
const styleName = currentPreset ? currentPreset.text : "custom";
|
||||||
|
document.getElementById("styleSaverName").value = styleName;
|
||||||
styleSaverJSON.value = JSON.stringify(getStyle(), null, 2);
|
styleSaverJSON.value = JSON.stringify(getStyle(), null, 2);
|
||||||
checkName();
|
checkName();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue