test for null and remove logging

This commit is contained in:
ljleb
2025-05-23 13:36:57 -04:00
parent 49b59d5367
commit 33bf54f5e1
+3 -3
View File
@@ -144,15 +144,15 @@ app.registerExtension({
for (const iv of (node.inputs || []).slice()) {
const iv_idx = node.inputs.indexOf(iv);
if (iv.type === "MECHA_RECIPE" || iv.type === "MECHA_RECIPE_LIST" || iv.type === "MECHA_HYPER") {
console.log(node.type, iv.name);
for (const iv2 of node.inputs.slice()) {
if (
iv.name.split(" ")[0] === iv2.name.split(" ")[0] &&
iv !== iv2 &&
(customDefInputNames[node.type] || {})[iv2.name.split(" ")[0]] === iv2.name
) {
console.log("removing", node, iv);
iv2.link = iv.link;
if (iv.link !== null) {
iv2.link = iv.link;
}
node.inputs.splice(iv_idx, 1);
}
}