fix: classify question connection type

This commit is contained in:
archer 2024-03-05 09:48:26 +08:00
parent b50517e8be
commit c7fb528a67
No known key found for this signature in database
GPG Key ID: 569A5660D2379E28
2 changed files with 3 additions and 3 deletions

View File

@ -178,7 +178,7 @@ export const FlowProvider = ({
const source = nodes.find((node) => node.id === connect.source)?.data;
const sourceType = (() => {
if (source?.flowType === FlowNodeTypeEnum.classifyQuestion) {
return ModuleIOValueTypeEnum.string;
return ModuleIOValueTypeEnum.boolean;
}
if (source?.flowType === FlowNodeTypeEnum.pluginInput) {
return source?.inputs.find((input) => input.key === connect.sourceHandle)?.valueType;
@ -189,7 +189,7 @@ export const FlowProvider = ({
const targetType = nodes
.find((node) => node.id === connect.target)
?.data?.inputs.find((input) => input.key === connect.targetHandle)?.valueType;
console.log(source, targetType);
if (!sourceType || !targetType) {
return toast({
status: 'warning',

View File

@ -85,7 +85,7 @@ const RegisterForm = ({ setPageType, loginSuccess }: Props) => {
}
setRequesting(false);
},
[loginSuccess, toast]
[loginSuccess, t, toast]
);
return (