From e8539add51f84a88bfa40a2f08bb5c34c171c77f Mon Sep 17 00:00:00 2001 From: space-nuko <24979496+space-nuko@users.noreply.github.com> Date: Thu, 1 Jun 2023 16:24:17 -0500 Subject: [PATCH] Fix missing index check --- src/lib/components/ComfyPromptSerializer.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/components/ComfyPromptSerializer.ts b/src/lib/components/ComfyPromptSerializer.ts index cfb5786..ec21339 100644 --- a/src/lib/components/ComfyPromptSerializer.ts +++ b/src/lib/components/ComfyPromptSerializer.ts @@ -94,7 +94,7 @@ function followGraphInput(graphInput: GraphInput, link: LLink): UpstreamResult { throw new Error("No outer subgraph!") const outerInputIndex = outerSubgraph.inputs.findIndex(i => i.name === graphInput.nameInGraph) - if (outerInputIndex == null) + if (outerInputIndex === -1) throw new Error("No outer input slot!") const nextLink = outerSubgraph.getInputLink(outerInputIndex)