🐛 fix: Fix error handling and loading state in CheckUpdates component

This commit is contained in:
MartialBE 2024-03-30 21:53:46 +08:00
parent 37429f722c
commit 91a113d09b
No known key found for this signature in database
GPG Key ID: F5A7AC860020C896

View File

@ -47,11 +47,13 @@ export const CheckUpdates = ({ open, onCancel, onOk, row }) => {
setUpdateLoading(true); setUpdateLoading(true);
if (!newPricing.length) { if (!newPricing.length) {
showError('请先获取数据'); showError('请先获取数据');
setUpdateLoading(false);
return; return;
} }
if (!overwrite && !addModel.length) { if (!overwrite && !addModel.length) {
showError('没有新增模型'); showError('没有新增模型');
setUpdateLoading(false);
return; return;
} }
try { try {