mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 09:41:24 +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"}
|
||||
});
|
||||
|
||||
const currentStyle = document.getElementById("stylePreset").selectedOptions[0].text;
|
||||
document.getElementById("styleSaverName").value = currentStyle;
|
||||
const currentPreset = document.getElementById("stylePreset").selectedOptions[0];
|
||||
const styleName = currentPreset ? currentPreset.text : "custom";
|
||||
document.getElementById("styleSaverName").value = styleName;
|
||||
styleSaverJSON.value = JSON.stringify(getStyle(), null, 2);
|
||||
checkName();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue