Hello,
I am experiencing this error when connecting two ports. I have looked into source code and it would be great if ejs library would null check eventArg value
ERROR TypeError: Cannot set property 'actualObject' of null at ObjectFinder.findObjectUnderMouse (ej2-diagrams.es2015.js:24520)
at DiagramEventHandler.findObjectUnderMouse (ej2-diagrams.es2015.js:24045)
at ComponentBase.findObjectUnderMouse (ej2-diagrams.es2015.js:30780)
at DiagramEventHandler.mouseMove (ej2-diagrams.es2015.js:23038)
at ZoneDelegate.invokeTask (zone-evergreen.js:400)
at Object.onInvokeTask (core.js:39680)
at ZoneDelegate.invokeTask (zone-evergreen.js:399)
at Zone.runTask (zone-evergreen.js:168)
at ZoneTask.invokeTask [as invoke] (zone-evergreen.js:481)
at invokeTask (zone-evergreen.js:1596)
Problematic source code
if ((action === 'ConnectorSourceEnd' && source || action === 'PortDraw') ||
((canDrawOnce(diagram) || canContinuousDraw(diagram)) && getObjectType(diagram.drawingObject) === Connector)) {
let connector = diagram.selectedItems.connectors[0];
for (let i = objects.length - 1; i >= 0; i--) {
outPort = getInOutConnectPorts(objects[i], false);
if (objects[i] instanceof Node && (canOutConnect(objects[i]) || (canPortOutConnect(outPort)))) {
actualTarget = objects[i];
if (connector) {
actualTarget = this.isTarget(actualTarget, diagram, action);
}
eventArg.actualObject = actualTarget;
return actualTarget;
}
}
}