Skip to content

Commit

Permalink
fix: check reference
Browse files Browse the repository at this point in the history
  • Loading branch information
c121914yu committed Nov 26, 2024
1 parent a75036b commit 89cd2d0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion projects/app/src/web/core/workflow/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { EmptyNode } from '@fastgpt/global/core/workflow/template/system/emptyNo
import { StoreEdgeItemType } from '@fastgpt/global/core/workflow/type/edge';
import { getNanoid } from '@fastgpt/global/common/string/tools';
import { getGlobalVariableNode } from './adapt';
import { WorkflowIOValueTypeEnum } from '@fastgpt/global/core/workflow/constants';
import { VARIABLE_NODE_ID, WorkflowIOValueTypeEnum } from '@fastgpt/global/core/workflow/constants';
import { NodeInputKeyEnum, NodeOutputKeyEnum } from '@fastgpt/global/core/workflow/constants';
import { EditorVariablePickerType } from '@fastgpt/web/components/common/Textarea/PromptEditor/type';
import {
Expand Down Expand Up @@ -425,6 +425,10 @@ export const checkWorkflowNodeAndConnection = ({

if (!nodeId || !outputId) return false;

if (nodeId === VARIABLE_NODE_ID) {
return true;
}

return !!nodes
.find((node) => node.data.nodeId === nodeId)
?.data.outputs.find((output) => output.id === outputId);
Expand Down

0 comments on commit 89cd2d0

Please sign in to comment.