MCPcopy Create free account
hub / github.com/FlowiseAI/Flowise / handlesEqual

Function handlesEqual

packages/ui/src/utils/genericHelper.js:370–380  ·  view source on GitHub ↗
(a, b)

Source from the content-addressed store, hash-verified

368 // azureChatOpenAI_0-output-azureChatOpenAI-A|B|C vs azureChatOpenAI_0-output-azureChatOpenAI-A|B
369 // We compare by stripping the last "-..." segment if it contains pipes.
370 const handlesEqual = (a, b) => {
371 if (a === b) return true
372 const stripPipeSuffix = (s) => {
373 if (!s) return s
374 const lastDash = s.lastIndexOf('-')
375 if (lastDash === -1) return s
376 const suffix = s.substring(lastDash + 1)
377 return suffix.includes('|') ? s.substring(0, lastDash) : s
378 }
379 return stripPipeSuffix(a) === stripPipeSuffix(b)
380 }
381
382 for (const edge of edges) {
383 const targetNodeId = edge.targetHandle.split('-')[0]

Callers 1

updateOutdatedNodeEdgeFunction · 0.85

Calls 1

stripPipeSuffixFunction · 0.85

Tested by

no test coverage detected