From 64e3a43527a5f0b7a6f906ccbff947f134a282a0 Mon Sep 17 00:00:00 2001 From: Jacob Segal Date: Thu, 1 Aug 2024 20:04:49 -0700 Subject: [PATCH] Clean up Javascript code as per review --- web/scripts/ui.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/web/scripts/ui.js b/web/scripts/ui.js index f35e2e0c3..05258e378 100644 --- a/web/scripts/ui.js +++ b/web/scripts/ui.js @@ -241,11 +241,8 @@ class ComfyList { if (item.outputs) { app.nodeOutputs = {}; for (const [key, value] of Object.entries(item.outputs)) { - if (item.meta && item.meta[key] && item.meta[key].display_node) { - app.nodeOutputs[item.meta[key].display_node] = value; - } else { - app.nodeOutputs[key] = value; - } + const realKey = item?.meta?.[key]?.display_node ?? key; + app.nodeOutputs[realKey] = value; } } },