diff --git a/src/main/DiagramCanvas.tsx b/src/main/DiagramCanvas.tsx index 7edb1446..39eec633 100644 --- a/src/main/DiagramCanvas.tsx +++ b/src/main/DiagramCanvas.tsx @@ -248,12 +248,10 @@ export default class DiagramCanvas extends React.Component { ...getElementToolPosition(id), action: (evt: { currentTarget: { getAttribute: (arg0: string) => any }; - }) => { - if (graph.getElements().length > 1) - this.createNewLink( - evt.currentTarget.getAttribute("model-id") - ); - }, + }) => + this.createNewLink( + evt.currentTarget.getAttribute("model-id") + ), }), tool, ],