mirror of
https://github.com/simstudioai/sim.git
synced 2026-09-24 15:45:35 +08:00
fix sourceBlock null check
This commit is contained in:
@@ -167,6 +167,7 @@ export function useBlockConnections(blockId: string) {
|
||||
.filter((edge) => edge.target === blockId)
|
||||
.map((edge) => {
|
||||
const sourceBlock = blocks[edge.source]
|
||||
if (!sourceBlock) return null
|
||||
|
||||
// Get the response format from the subblock store instead
|
||||
const responseFormatValue = useSubBlockStore
|
||||
@@ -202,6 +203,7 @@ export function useBlockConnections(blockId: string) {
|
||||
responseFormat,
|
||||
}
|
||||
})
|
||||
.filter(Boolean) as ConnectedBlock[]
|
||||
|
||||
return {
|
||||
incomingConnections: allPathConnections,
|
||||
|
||||
Reference in New Issue
Block a user