Merge pull request #4538 from bcakmakoglu/fix/handle-err
fix(system,errors): use handle id of matching handle type for errors
This commit is contained in:
@@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
'@xyflow/system': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Use the handle id of the matching handle type when warning about an edge that can't be created due to missing handle ids.
|
||||||
@@ -16,7 +16,7 @@ export const errorMessages = {
|
|||||||
{ id, sourceHandle, targetHandle }: { id: string; sourceHandle: string | null; targetHandle: string | null }
|
{ id, sourceHandle, targetHandle }: { id: string; sourceHandle: string | null; targetHandle: string | null }
|
||||||
) =>
|
) =>
|
||||||
`Couldn't create edge for ${handleType} handle id: "${
|
`Couldn't create edge for ${handleType} handle id: "${
|
||||||
!sourceHandle ? sourceHandle : targetHandle
|
handleType === 'source' ? sourceHandle : targetHandle
|
||||||
}", edge id: ${id}.`,
|
}", edge id: ${id}.`,
|
||||||
error010: () => 'Handle: No node id found. Make sure to only use a Handle inside a custom Node.',
|
error010: () => 'Handle: No node id found. Make sure to only use a Handle inside a custom Node.',
|
||||||
error011: (edgeType: string) => `Edge type "${edgeType}" not found. Using fallback type "default".`,
|
error011: (edgeType: string) => `Edge type "${edgeType}" not found. Using fallback type "default".`,
|
||||||
|
|||||||
Reference in New Issue
Block a user