diff --git a/src/components/rightSidePanel/parameters/TabSubgraphInputs.vue b/src/components/rightSidePanel/parameters/TabSubgraphInputs.vue index 6e6fc4e1f6..772b8d8958 100644 --- a/src/components/rightSidePanel/parameters/TabSubgraphInputs.vue +++ b/src/components/rightSidePanel/parameters/TabSubgraphInputs.vue @@ -5,7 +5,6 @@ import { useI18n } from 'vue-i18n' import { promotedInputWidgets } from '@/core/graph/subgraph/promotedInputWidget' import { - getWidgetName, isWidgetPromotedOnSubgraphNode, reorderSubgraphInputsByWidgetOrder } from '@/core/graph/subgraph/promotionUtils' @@ -83,7 +82,7 @@ const advancedInputsWidgets = computed((): NodeWidgetsList => { ({ node: interiorNode, widget }) => !isWidgetPromotedOnSubgraphNode(node, { sourceNodeId: interiorNode.id, - sourceWidgetName: getWidgetName(widget) + sourceWidgetName: widget.name }) ) }) diff --git a/src/core/graph/subgraph/promotionUtils.ts b/src/core/graph/subgraph/promotionUtils.ts index 87af0f376f..a60a74fd22 100644 --- a/src/core/graph/subgraph/promotionUtils.ts +++ b/src/core/graph/subgraph/promotionUtils.ts @@ -30,10 +30,6 @@ type PartialNode = Pick export type WidgetItem = [LGraphNode, IBaseWidget] export { CANVAS_IMAGE_PREVIEW_WIDGET } -export function getWidgetName(w: IBaseWidget): string { - return w.name -} - function isLinkedPromotion( subgraphNode: SubgraphNode, sourceNodeId: SerializedNodeId, @@ -224,7 +220,7 @@ function toPromotionSource( ): PromotedWidgetSource { return { sourceNodeId: node.id, - sourceWidgetName: getWidgetName(widget) + sourceWidgetName: widget.name } } @@ -245,7 +241,7 @@ export function promoteValueWidgetViaSubgraphInput( sourceNode: LGraphNode, sourceWidget: IBaseWidget ): CanonicalPromotionResult { - const sourceWidgetName = getWidgetName(sourceWidget) + const sourceWidgetName = sourceWidget.name if (isLinkedPromotion(subgraphNode, sourceNode.id, sourceWidgetName)) { return { ok: true } } @@ -595,7 +591,7 @@ export function promoteRecommendedWidgets(subgraphNode: SubgraphNode) { Sentry.addBreadcrumb({ category: 'subgraph', level: 'warning', - message: `Failed to promote widget "${getWidgetName(w)}" on node ${n.id}: ${result.reason}` + message: `Failed to promote widget "${w.name}" on node ${n.id}: ${result.reason}` }) } }