Skip to content

Commit

Permalink
Fix custom node def validation issue (#137)
Browse files Browse the repository at this point in the history
* Fix nodeDef.output undefined

* fix2

* nit
  • Loading branch information
huchenlei authored Jul 17, 2024
1 parent 2ab3c2b commit 3fbaeb1
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/services/nodeSearchService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,14 @@ export class OutputTypeFilter extends NodeFilter<string> {
public readonly longInvokeSequence = "output";

public override getNodeOptions(node: ComfyNodeDef): string[] {
const outputs = node.output;
const outputs = node.output || [];
// "custom_nodes.was-node-suite-comfyui"
// has a custom node with an output that is not an array.
// https://github.com/WASasquatch/was-node-suite-comfyui/pull/440
if (!(outputs instanceof Array)) {
console.error("Invalid output type", node);
return [];
}
return outputs.map((output) => {
return typeof output === "string" ? output : output[0];
});
Expand Down

0 comments on commit 3fbaeb1

Please sign in to comment.