ratio must gte 0

This commit is contained in:
liuzhifei
2024-09-20 18:27:16 +08:00
parent 1d064a2e88
commit 3d33079de0
2 changed files with 6 additions and 4 deletions

View File

@@ -51,14 +51,16 @@ export default function SettingsMagnification(props) {
return showError('部分保存失败,请重试');
}
for (let i = 0; i < res.length; i++) {
if (!res[i].success) {
return showError(res[i].message)
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(() => {