mirror of https://github.com/langgenius/dify.git
fix: update checkValidFns type to Partial and ensure error message fallback in useOneStepRun
This commit is contained in:
parent
000e8bd12b
commit
fcfade4778
|
|
@ -70,7 +70,7 @@ import {
|
|||
} from '@/service/use-tools'
|
||||
|
||||
// eslint-disable-next-line ts/no-unsafe-function-type
|
||||
const checkValidFns: Record<BlockEnum, Function> = {
|
||||
const checkValidFns: Partial<Record<BlockEnum, Function>> = {
|
||||
[BlockEnum.LLM]: checkLLMValid,
|
||||
[BlockEnum.KnowledgeRetrieval]: checkKnowledgeRetrievalValid,
|
||||
[BlockEnum.IfElse]: checkIfElseValid,
|
||||
|
|
@ -631,7 +631,7 @@ const useOneStepRun = <T>({
|
|||
})
|
||||
Toast.notify({
|
||||
type: 'error',
|
||||
message: res.errorMessage,
|
||||
message: res.errorMessage || '',
|
||||
})
|
||||
}
|
||||
return res
|
||||
|
|
|
|||
Loading…
Reference in New Issue