fix(AboutSettings.tsx): handle errors in update check by setting loading state
This commit is contained in:
parent
8719d5c330
commit
a39beb3841
@ -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…
x
Reference in New Issue
Block a user