Merge pull request #493 from xixingya/feature/bug-fix

ratio must gte 0
This commit is contained in:
Calcium-Ion
2024-11-19 18:34:24 +08:00
committed by GitHub
3 changed files with 32 additions and 1 deletions

View File

@@ -50,10 +50,17 @@ export default function SettingsMagnification(props) {
if (res.includes(undefined))
return showError('部分保存失败,请重试');
}
for (let i = 0; i < res.length; i++) {
if (!res[i].data.success) {
return showError(res[i].data.message)
}
}
showSuccess('保存成功');
props.refresh();
})
.catch(() => {
.catch(error => {
console.error('Unexpected error in Promise.all:', error);
showError('保存失败,请重试');
})
.finally(() => {