Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
ComfyUI
Commits
6f0f8aa7
Commit
6f0f8aa7
authored
Jun 21, 2023
by
comfyanonymous
Browse files
Merge branch 'reroute-disconnect-fix' of
https://github.com/ssitu/ComfyUI
parents
51581dbf
6f54b019
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
web/extensions/core/rerouteNode.js
web/extensions/core/rerouteNode.js
+4
-0
No files found.
web/extensions/core/rerouteNode.js
View file @
6f0f8aa7
...
...
@@ -24,9 +24,13 @@ app.registerExtension({
// Ignore wildcard nodes as these will be updated to real types
const
types
=
new
Set
(
this
.
outputs
[
0
].
links
.
map
((
l
)
=>
app
.
graph
.
links
[
l
].
type
).
filter
((
t
)
=>
t
!==
"
*
"
));
if
(
types
.
size
>
1
)
{
const
linksToDisconnect
=
[];
for
(
let
i
=
0
;
i
<
this
.
outputs
[
0
].
links
.
length
-
1
;
i
++
)
{
const
linkId
=
this
.
outputs
[
0
].
links
[
i
];
const
link
=
app
.
graph
.
links
[
linkId
];
linksToDisconnect
.
push
(
link
);
}
for
(
const
link
of
linksToDisconnect
)
{
const
node
=
app
.
graph
.
getNodeById
(
link
.
target_id
);
node
.
disconnectInput
(
link
.
target_slot
);
}
...
...
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