From 028e5d75bf8eb7ac02c498a814858d7a18757322 Mon Sep 17 00:00:00 2001 From: wongpratan Date: Tue, 8 Apr 2025 16:15:05 +0700 Subject: [PATCH] *Prevent duplicate - https://github.com/digi-serve/ns_app/issues/602 --- .../properties/process/ABProcessGatewayExclusive.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/rootPages/Designer/properties/process/ABProcessGatewayExclusive.js b/src/rootPages/Designer/properties/process/ABProcessGatewayExclusive.js index a3640b41..f0f3d32e 100644 --- a/src/rootPages/Designer/properties/process/ABProcessGatewayExclusive.js +++ b/src/rootPages/Designer/properties/process/ABProcessGatewayExclusive.js @@ -72,8 +72,12 @@ export default function (AB) { }) .filter((f) => f); - const myOutgoingConnections = element.process.connectionsOutgoing( - element.diagramID + const myOutgoingConnections = ( + element.process?.connectionsOutgoing?.(element.diagramID) ?? [] + ).filter( + // Prevent duplicates + (conn, pos, self) => + self.findIndex((item) => item.id === conn.id) === pos ); this.__dfLookup = {};