fix error widgethider.js (#321)

fix error widgethider.js
This commit is contained in:
NyaamZ
2025-05-30 12:14:37 +09:00
committed by GitHub
parent 9e3c5aa497
commit 3c5fc7eb35

View File

@@ -8,7 +8,8 @@ const findWidgetByName = (node, name) => {
}; };
const doesInputWithNameExist = (node, name) => { const doesInputWithNameExist = (node, name) => {
return node.inputs ? node.inputs.some((input) => input.name === name) : false; // return node.inputs ? node.inputs.some((input) => input.name === name) : false;
return false;
}; };
const HIDDEN_TAG = "tschide"; const HIDDEN_TAG = "tschide";
@@ -605,7 +606,9 @@ function handleXYInputControlNetPlotPlotType(node, widget) {
app.registerExtension({ app.registerExtension({
name: "efficiency.widgethider", name: "efficiency.widgethider",
nodeCreated(node) { nodeCreated(node) {
if (!nodeWidgetHandlers[node.comfyClass]) return;
for (const w of node.widgets || []) { for (const w of node.widgets || []) {
if (!nodeWidgetHandlers[node.comfyClass][w.name]) continue;
let widgetValue = w.value; let widgetValue = w.value;
// Store the original descriptor if it exists // Store the original descriptor if it exists