mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-12 23:04:52 +09:00
Fix create save modal
Fix the wrong variable being passed as mapSettings and clear the form after successfully creating the save.
This commit is contained in:
1 parent
f37c387d52
commit
0e9893fcb6
1 file changed
+2
-1
@@ -43,7 +43,7 @@ export default function CreateSaveModal(props) {
|
||||
}
|
||||
if (values.mapSettings && values.mapSettings.trim()) {
|
||||
try {
|
||||
mapSettings = JSON.parse(values.mapGenSettings);
|
||||
mapSettings = JSON.parse(values.mapSettings);
|
||||
} catch (err) {
|
||||
form.setFields([{ name: "mapSettings", errors: [err.message] }]);
|
||||
return;
|
||||
@@ -59,6 +59,7 @@ export default function CreateSaveModal(props) {
|
||||
map_gen_settings: mapGenSettings,
|
||||
map_settings: mapSettings,
|
||||
}).then(() => {
|
||||
form.resetFields();
|
||||
setVisible(false);
|
||||
}).catch(
|
||||
notifyErrorHandler("Error creating save")
|
||||
|
||||
Reference in new issue
Block a user