Skip to content

Commit 3fbaeb1

Browse files
authored
Fix custom node def validation issue (#137)
* Fix nodeDef.output undefined * fix2 * nit
1 parent 2ab3c2b commit 3fbaeb1

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/services/nodeSearchService.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,14 @@ export class OutputTypeFilter extends NodeFilter<string> {
119119
public readonly longInvokeSequence = "output";
120120

121121
public override getNodeOptions(node: ComfyNodeDef): string[] {
122-
const outputs = node.output;
122+
const outputs = node.output || [];
123+
// "custom_nodes.was-node-suite-comfyui"
124+
// has a custom node with an output that is not an array.
125+
// https://github.com/WASasquatch/was-node-suite-comfyui/pull/440
126+
if (!(outputs instanceof Array)) {
127+
console.error("Invalid output type", node);
128+
return [];
129+
}
123130
return outputs.map((output) => {
124131
return typeof output === "string" ? output : output[0];
125132
});

0 commit comments

Comments
 (0)