Fix - binding to nonexistent element

This commit is contained in:
zsviczian 2024-06-13 18:50:51 +02:00 committed by GitHub
parent d2f67e619f
commit 16c0417f5b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -828,6 +828,9 @@ const bindingBorderTest = (
{ x, y }: { x: number; y: number },
app: AppClassProperties,
): boolean => {
if(!element || !element.width || !element.height) {
return false;
}
const threshold = maxBindingGap(element, element.width, element.height);
const shape = app.getElementShape(element);
return isPointOnShape([x, y], shape, threshold);