mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-01-27 23:00:20 +08:00
cleanup return value of seedWidget
This commit is contained in:
parent
662f297a1c
commit
21b0104602
@ -284,7 +284,8 @@ app.registerExtension({
|
||||
// so let's check for those first
|
||||
let combinedWidgetType = type + ":" + widgetName;
|
||||
if (combinedWidgetType in ComfyWidgets) {
|
||||
widget = (ComfyWidgets[combinedWidgetType](this, "value", inputData, app) || {}).widget;
|
||||
// widget = (ComfyWidgets[combinedWidgetType](this, "value", inputData, app) || {}).widget;
|
||||
widget = (ComfyWidgets[combinedWidgetType](this, widgetName, inputData, app) || {}).widget;
|
||||
} else {
|
||||
// we did not find a subtype, so proceed with "<type>" only
|
||||
if (type in ComfyWidgets) {
|
||||
@ -302,7 +303,7 @@ app.registerExtension({
|
||||
|
||||
if (node?.widgets && widget) {
|
||||
|
||||
const theirWidget = node.widgets.find((w) => w.name === widgetName);
|
||||
const theirWidget = node.widgets.find((w) => w.name === widgetName);
|
||||
if (theirWidget) {
|
||||
widget.value = theirWidget.value;
|
||||
}
|
||||
|
||||
@ -59,7 +59,7 @@ function seedWidget(node, inputName, inputData) {
|
||||
const seedControl = addSeedControlWidget(node, seed.widget, "randomize");
|
||||
|
||||
seed.widget.linkedWidgets = [seedControl];
|
||||
return { widget: seed, seedControl };
|
||||
return seed;
|
||||
}
|
||||
|
||||
const MultilineSymbol = Symbol();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user