[backport core/1.41] fix: clear stale widget slotMetadata on link disconnect (#9919)

Backport of #9885 to `core/1.41`

Automatically created by backport workflow.

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-9919-backport-core-1-41-fix-clear-stale-widget-slotMetadata-on-link-disconnect-3236d73d365081028353cbabd935e7a0)
by [Unito](https://www.unito.io)

Co-authored-by: Christian Byrne <cbyrne@comfy.org>
This commit is contained in:
Comfy Org PR Bot
2026-03-15 04:17:48 +09:00
committed by GitHub
parent 65079e51ca
commit 2d3de22150
2 changed files with 27 additions and 2 deletions

View File

@@ -467,8 +467,7 @@ export function useGraphNodeManager(graph: LGraph): GraphNodeManager {
// Update only widgets with new slot metadata, keeping other widget data intact
for (const widget of currentData.widgets ?? []) {
const slotInfo = slotMetadata.get(widget.slotName ?? widget.name)
if (slotInfo) widget.slotMetadata = slotInfo
widget.slotMetadata = slotMetadata.get(widget.slotName ?? widget.name)
}
}