mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-22 08:13:12 +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()) {
|
if (values.mapSettings && values.mapSettings.trim()) {
|
||||||
try {
|
try {
|
||||||
mapSettings = JSON.parse(values.mapGenSettings);
|
mapSettings = JSON.parse(values.mapSettings);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
form.setFields([{ name: "mapSettings", errors: [err.message] }]);
|
form.setFields([{ name: "mapSettings", errors: [err.message] }]);
|
||||||
return;
|
return;
|
||||||
@@ -59,6 +59,7 @@ export default function CreateSaveModal(props) {
|
|||||||
map_gen_settings: mapGenSettings,
|
map_gen_settings: mapGenSettings,
|
||||||
map_settings: mapSettings,
|
map_settings: mapSettings,
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
|
form.resetFields();
|
||||||
setVisible(false);
|
setVisible(false);
|
||||||
}).catch(
|
}).catch(
|
||||||
notifyErrorHandler("Error creating save")
|
notifyErrorHandler("Error creating save")
|
||||||
|
|||||||
Reference in new issue
Block a user