fix: state handling - should set active model to undefined if loaded fail

This commit is contained in:
Louis 2023-11-14 19:40:53 +07:00
parent d7efd9813a
commit 89387c8a1b

View File

@ -52,6 +52,7 @@ export function useActiveModel() {
loading: false, loading: false,
model: modelId, model: modelId,
})) }))
setActiveModel(undefined)
} else { } else {
console.debug( console.debug(
`Init model ${modelId} successfully!, take ${ `Init model ${modelId} successfully!, take ${