mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-25 03:10:08 +08:00
fix(AboutSettings.tsx): handle errors in update check by setting loading state
This commit is contained in:
parent
6f9eb468f5
commit
462387999e
@ -20,7 +20,13 @@ const AboutSettings: FC = () => {
|
||||
async () => {
|
||||
if (checkUpdateLoading || downloading) return
|
||||
setCheckUpdateLoading(true)
|
||||
await window.api.checkForUpdate()
|
||||
|
||||
try {
|
||||
await window.api.checkForUpdate()
|
||||
} catch (error) {
|
||||
setCheckUpdateLoading(false)
|
||||
}
|
||||
|
||||
setCheckUpdateLoading(false)
|
||||
},
|
||||
2000,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user