fix: first time download
This commit is contained in:
parent
b4e520958f
commit
7a62e7718e
|
@ -63,7 +63,15 @@ const Panel: React.FC = () => {
|
|||
}
|
||||
})
|
||||
} else {
|
||||
setCheckDisabled(true)
|
||||
GetLatestVersion().then(res => {
|
||||
if (res === null) {
|
||||
toast('Get database failed.', {
|
||||
description: '⛓️💥 Please check your internet connection.'
|
||||
})
|
||||
} else {
|
||||
setNewVersion(res)
|
||||
}
|
||||
})
|
||||
setMacInputDisabled(true)
|
||||
setIsOpen(true)
|
||||
}
|
||||
|
@ -109,7 +117,7 @@ const Panel: React.FC = () => {
|
|||
const handleCheck = () => {
|
||||
setCheckDisabled(true)
|
||||
GetLatestVersion().then(res => {
|
||||
if (res.Version === null) {
|
||||
if (res === null) {
|
||||
setCheckDisabled(false)
|
||||
toast('Check update failed.', {
|
||||
description: '⛓️💥 Please check your internet connection.',
|
||||
|
|
Loading…
Reference in New Issue