mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-01-08 14:29:15 +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 () => {
|
async () => {
|
||||||
if (checkUpdateLoading || downloading) return
|
if (checkUpdateLoading || downloading) return
|
||||||
setCheckUpdateLoading(true)
|
setCheckUpdateLoading(true)
|
||||||
await window.api.checkForUpdate()
|
|
||||||
|
try {
|
||||||
|
await window.api.checkForUpdate()
|
||||||
|
} catch (error) {
|
||||||
|
setCheckUpdateLoading(false)
|
||||||
|
}
|
||||||
|
|
||||||
setCheckUpdateLoading(false)
|
setCheckUpdateLoading(false)
|
||||||
},
|
},
|
||||||
2000,
|
2000,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user