mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 08:19:52 +03:00
replace void with await
This commit is contained in:
@@ -95,7 +95,7 @@ const SettingsApplication: FC = () => {
|
||||
try {
|
||||
setFieldErrors(undefined);
|
||||
await validate(createSettingsValidator(data), data);
|
||||
void saveData();
|
||||
await saveData();
|
||||
} catch (errors: any) {
|
||||
setFieldErrors(errors);
|
||||
}
|
||||
@@ -115,7 +115,7 @@ const SettingsApplication: FC = () => {
|
||||
};
|
||||
|
||||
const restart = async () => {
|
||||
void validateAndSubmit();
|
||||
await validateAndSubmit();
|
||||
try {
|
||||
await EMSESP.restart();
|
||||
setRestarting(true);
|
||||
|
||||
Reference in New Issue
Block a user