mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-05-13 09:16:20 +00:00
fix: App mode - renaming widgets on subgraphs (#10245)
## Summary Fixes renaming of widgets from subgraph nodes in app builder/app mode. ## Changes - **What**: If the widget is from a subgraph node and no parents passed, use the node as the subgraph parent. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-10245-fix-App-mode-renaming-widgets-on-subgraphs-3276d73d3650815bb131c840df43cdf2) by [Unito](https://www.unito.io)
This commit is contained in:
@@ -48,7 +48,10 @@ export function renameWidget(
|
||||
newLabel: string,
|
||||
parents?: SubgraphNode[]
|
||||
): boolean {
|
||||
if (isPromotedWidgetView(widget) && parents?.length) {
|
||||
if (
|
||||
isPromotedWidgetView(widget) &&
|
||||
(parents?.length || node.isSubgraphNode())
|
||||
) {
|
||||
const sourceWidget = resolvePromotedWidgetSource(node, widget)
|
||||
if (!sourceWidget) {
|
||||
console.error('Could not resolve source widget for promoted widget')
|
||||
|
||||
Reference in New Issue
Block a user