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
bc1f6e21
Unverified
Commit
bc1f6e21
authored
Sep 05, 2023
by
Michael Poutre
Browse files
fix(ui/widgets): Only set widget forceInput option if a widget is added
parent
f368e5ac
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
web/scripts/app.js
web/scripts/app.js
+4
-1
No files found.
web/scripts/app.js
View file @
bc1f6e21
...
@@ -1228,6 +1228,7 @@ export class ComfyApp {
...
@@ -1228,6 +1228,7 @@ export class ComfyApp {
const
inputData
=
inputs
[
inputName
];
const
inputData
=
inputs
[
inputName
];
const
type
=
inputData
[
0
];
const
type
=
inputData
[
0
];
let
widgetCreated
=
true
;
if
(
Array
.
isArray
(
type
))
{
if
(
Array
.
isArray
(
type
))
{
// Enums
// Enums
Object
.
assign
(
config
,
widgets
.
COMBO
(
this
,
inputName
,
inputData
,
app
)
||
{});
Object
.
assign
(
config
,
widgets
.
COMBO
(
this
,
inputName
,
inputData
,
app
)
||
{});
...
@@ -1240,8 +1241,10 @@ export class ComfyApp {
...
@@ -1240,8 +1241,10 @@ export class ComfyApp {
}
else
{
}
else
{
// Node connection inputs
// Node connection inputs
this
.
addInput
(
inputName
,
type
);
this
.
addInput
(
inputName
,
type
);
widgetCreated
=
false
;
}
}
if
(
inputData
[
1
]?.
forceInput
&&
config
?.
widget
)
{
if
(
widgetCreated
&&
inputData
[
1
]?.
forceInput
&&
config
?.
widget
)
{
if
(
!
config
.
widget
.
options
)
config
.
widget
.
options
=
{};
if
(
!
config
.
widget
.
options
)
config
.
widget
.
options
=
{};
config
.
widget
.
options
.
forceInput
=
inputData
[
1
].
forceInput
;
config
.
widget
.
options
.
forceInput
=
inputData
[
1
].
forceInput
;
}
}
...
...
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