mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-10 01:50:08 +00:00
Merge pull request #4 from sebsofen/fix
fixing problem when adding nodes to existing graph that was loaded from file
This commit is contained in:
@@ -685,7 +685,9 @@ LGraph.prototype.add = function(node, skip_compute_order)
|
||||
|
||||
//give him an id
|
||||
if(node.id == null || node.id == -1)
|
||||
node.id = this.last_node_id++;
|
||||
node.id = ++this.last_node_id;
|
||||
else if (this.last_node_id < node.id)
|
||||
this.last_node_id = node.id;
|
||||
|
||||
node.graph = this;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user