fix saveSettings is currently being called even when validation fails.
This commit is contained in:
1 parent
3ce40b1ab8
commit
1c1ac25857
1 file changed
+1
-1
@@ -168,6 +168,7 @@ const Settings = () => {
|
||||
});
|
||||
if (!error || error.details.length === 0) {
|
||||
setErrors({});
|
||||
saveSettings(settingsData?.settings);
|
||||
} else {
|
||||
const newErrors = {};
|
||||
error.details.forEach((err) => {
|
||||
@@ -176,7 +177,6 @@ const Settings = () => {
|
||||
|
||||
setErrors(newErrors);
|
||||
}
|
||||
saveSettings(settingsData?.settings);
|
||||
};
|
||||
|
||||
return (
|
||||
|
||||
Reference in new issue
Block a user