From 4c55f81e29eaafea42d274ca2cdf19375282842d Mon Sep 17 00:00:00 2001 From: Marcos Pieras <pieras.marcos@gmail.com> Date: Tue, 12 Nov 2024 11:28:08 +0000 Subject: [PATCH] fix: schema pop up relationship showing attr --- libs/shared/lib/schema/schema-utils/schema-usecases.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libs/shared/lib/schema/schema-utils/schema-usecases.ts b/libs/shared/lib/schema/schema-utils/schema-usecases.ts index 820c75d51..a00cb2fc0 100644 --- a/libs/shared/lib/schema/schema-utils/schema-usecases.ts +++ b/libs/shared/lib/schema/schema-utils/schema-usecases.ts @@ -64,6 +64,9 @@ export function schemaGraphology2Reactflow( export function createReactFlowNodes(graph: Graph): Array<Node> { const nodeElements: Array<Node> = []; graph.forEachNode((node: string, attributes: Attributes): void => { + if (!Array.isArray(attributes.attributes)) { + attributes.attributes = Object.values(attributes.attributes); + } const newNode: Node = { id: node, data: { @@ -74,7 +77,6 @@ export function createReactFlowNodes(graph: Graph): Array<Node> { }; nodeElements.push(newNode); }); - return nodeElements; } -- GitLab