fix: wrong condition for displaying error message (#1376)
This commit is contained in:
parent
f29739c133
commit
cebb6738c3
@ -36,13 +36,14 @@ const setDownloadStateFailedAtom = atom(
|
|||||||
const state = currentState[modelId]
|
const state = currentState[modelId]
|
||||||
if (!state) {
|
if (!state) {
|
||||||
console.debug(`Cannot find download state for ${modelId}`)
|
console.debug(`Cannot find download state for ${modelId}`)
|
||||||
toaster({
|
|
||||||
title: 'Download Failed',
|
|
||||||
description: `Model ${modelId} download failed: ${error}`,
|
|
||||||
type: 'error',
|
|
||||||
})
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
toaster({
|
||||||
|
title: 'Download Failed',
|
||||||
|
description: `Model ${modelId} download failed: ${error}`,
|
||||||
|
type: 'error',
|
||||||
|
})
|
||||||
|
|
||||||
delete currentState[modelId]
|
delete currentState[modelId]
|
||||||
set(modelDownloadStateAtom, currentState)
|
set(modelDownloadStateAtom, currentState)
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user