Skip to content

Commit

Permalink
fix: classify question connection type
Browse files Browse the repository at this point in the history
  • Loading branch information
c121914yu committed Mar 5, 2024
1 parent b50517e commit c7fb528
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions projects/app/src/components/core/module/Flow/FlowProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion projects/app/src/pages/login/components/RegisterForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ const RegisterForm = ({ setPageType, loginSuccess }: Props) => {
}
setRequesting(false);
},
[loginSuccess, toast]
[loginSuccess, t, toast]
);

return (
Expand Down

0 comments on commit c7fb528

Please sign in to comment.