mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-05-03 04:31:58 +00:00
Prevent configuring a node to a placeholder nodeId (#8342)
Litegraph uses `-1 ` as a placeholder node id to indicate that a node should be assigned a new node id when added to the graph. Under some unknown circumstances it's possible for a node to have this placeholder id saved in a workflow file. When this occurs, the node is loaded and assigned a new id, but then configured back to the placeholder id. This PR makes it so the newly assigned id is kept instead. ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-8342-Prevent-configuring-a-node-to-a-placehodler-nodeId-2f56d73d365081ed8217e989187b15c8) by [Unito](https://www.unito.io)
This commit is contained in:
@@ -785,6 +785,7 @@ export class LGraphNode
|
||||
if (this.graph) {
|
||||
this.graph._version++
|
||||
}
|
||||
if (info.id === -1) info.id = this.id
|
||||
for (const j in info) {
|
||||
if (j == 'properties') {
|
||||
// i don't want to clone properties, I want to reuse the old container
|
||||
|
||||
Reference in New Issue
Block a user