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]
|
||||
if (!state) {
|
||||
console.debug(`Cannot find download state for ${modelId}`)
|
||||
return
|
||||
}
|
||||
toaster({
|
||||
title: 'Download Failed',
|
||||
description: `Model ${modelId} download failed: ${error}`,
|
||||
type: 'error',
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
delete currentState[modelId]
|
||||
set(modelDownloadStateAtom, currentState)
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user