mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-08 09:00:05 +00:00
[TS] Add null check in graph to prompt (#2727)
This commit is contained in:
@@ -76,7 +76,10 @@ export const graphToPrompt = async (
|
||||
if (!parent) continue
|
||||
|
||||
let link = node.getInputLink(i)
|
||||
while (parent.mode === LGraphEventMode.BYPASS || parent.isVirtualNode) {
|
||||
while (
|
||||
parent?.mode === LGraphEventMode.BYPASS ||
|
||||
parent?.isVirtualNode
|
||||
) {
|
||||
if (!link) break
|
||||
|
||||
if (parent.isVirtualNode) {
|
||||
@@ -95,7 +98,7 @@ export const graphToPrompt = async (
|
||||
const indexes = [link.origin_slot].concat(parentInputIndexes)
|
||||
|
||||
const matchingIndex = indexes.find(
|
||||
(index) => parent.inputs[index]?.type === input.type
|
||||
(index) => parent?.inputs[index]?.type === input.type
|
||||
)
|
||||
// No input types match
|
||||
if (matchingIndex === undefined) break
|
||||
|
||||
Reference in New Issue
Block a user