mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-01-26 19:09:52 +00:00
Fix custom node def validation issue (#137)
* Fix nodeDef.output undefined * fix2 * nit
This commit is contained in:
@@ -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];
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user