mirror of
https://github.com/labring/FastGPT.git
synced 2026-05-03 01:02:15 +08:00
fix: deal with undefined valueType (#6684)
* fix: deal with undefined valueType * fix * fix * fix key
This commit is contained in:
@@ -232,6 +232,16 @@ export const FlowValueTypeMap: Record<
|
||||
}
|
||||
};
|
||||
|
||||
export const getFlowValueTypeMeta = (
|
||||
valueType?: WorkflowIOValueTypeEnum | string | null
|
||||
): (typeof FlowValueTypeMap)[WorkflowIOValueTypeEnum] => {
|
||||
if (valueType == null || valueType === '') {
|
||||
return FlowValueTypeMap[WorkflowIOValueTypeEnum.any];
|
||||
}
|
||||
const meta = FlowValueTypeMap[valueType as WorkflowIOValueTypeEnum];
|
||||
return meta ?? FlowValueTypeMap[WorkflowIOValueTypeEnum.any];
|
||||
};
|
||||
|
||||
export const EDGE_TYPE = 'default';
|
||||
|
||||
export const chatHistoryValueDesc = `{
|
||||
|
||||
Reference in New Issue
Block a user