Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
赵月辉
/
fastgpt-migrated
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Unverified
Commit
78a85bf8
authored
Oct 28, 2024
by
heheer
Committed by
GitHub
Oct 28, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: optimize tool node check in workflow (#3002)
* fix: optimize tool node check in workflow * comment
parent
a5b913f1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
projects/app/src/web/core/workflow/utils.ts
+10
-2
No files found.
projects/app/src/web/core/workflow/utils.ts
View file @
78a85bf8
...
@@ -352,8 +352,16 @@ export const checkWorkflowNodeAndConnection = ({
...
@@ -352,8 +352,16 @@ export const checkWorkflowNodeAndConnection = ({
return
[
data
.
nodeId
];
return
[
data
.
nodeId
];
}
}
// check empty node(not edge)
// filter tools node edge
const
hasEdge
=
edges
.
some
(
const
edgeFilted
=
edges
.
filter
(
(
edge
)
=>
!
(
data
.
flowNodeType
===
FlowNodeTypeEnum
.
tools
&&
edge
.
sourceHandle
===
NodeOutputKeyEnum
.
selectedTools
)
);
// check node has edge
const
hasEdge
=
edgeFilted
.
some
(
(
edge
)
=>
edge
.
source
===
data
.
nodeId
||
edge
.
target
===
data
.
nodeId
(
edge
)
=>
edge
.
source
===
data
.
nodeId
||
edge
.
target
===
data
.
nodeId
);
);
if
(
!
hasEdge
)
{
if
(
!
hasEdge
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment