From 610f61a9d6be6765cf672aa591a4d43cec60749d Mon Sep 17 00:00:00 2001 From: mohan-bee Date: Tue, 13 Jan 2026 11:02:19 +0530 Subject: [PATCH 1/2] fix: added a len check before draining --- node-graph/graph-craft/src/document.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/node-graph/graph-craft/src/document.rs b/node-graph/graph-craft/src/document.rs index 6ef88e9992..9410a8a079 100644 --- a/node-graph/graph-craft/src/document.rs +++ b/node-graph/graph-craft/src/document.rs @@ -791,7 +791,9 @@ impl NodeNetwork { node.implementation = identity_node; // Connect layer node to the group below - node.inputs.drain(1..); + if node.inputs.len() > 1 { + node.inputs.drain(1..); + } node.call_argument = concrete!(()); self.nodes.insert(id, node); return; From c7c6b1999569d6719e6f5ecd9d973ca7e48c7a16 Mon Sep 17 00:00:00 2001 From: mohan-bee Date: Tue, 13 Jan 2026 21:40:23 +0530 Subject: [PATCH 2/2] fix: added default unit value input --- node-graph/graph-craft/src/document.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/node-graph/graph-craft/src/document.rs b/node-graph/graph-craft/src/document.rs index 9410a8a079..59fae3a1c3 100644 --- a/node-graph/graph-craft/src/document.rs +++ b/node-graph/graph-craft/src/document.rs @@ -793,7 +793,10 @@ impl NodeNetwork { // Connect layer node to the group below if node.inputs.len() > 1 { node.inputs.drain(1..); + } else if node.inputs.is_empty() { + node.inputs.push(NodeInput::value(TaggedValue::None, false)); } + node.call_argument = concrete!(()); self.nodes.insert(id, node); return;