fix(system): safe check all event target

This commit is contained in:
CRIMX
2024-12-10 12:56:30 +08:00
parent 0f21ec21eb
commit b7b5032c02
9 changed files with 20 additions and 18 deletions
+1 -1
View File
@@ -364,7 +364,7 @@ export function XYDrag<OnNodeDrag extends (e: any, nodes: any, node: any) => voi
}
})
.filter((event: MouseEvent) => {
const target = event.target as HTMLDivElement;
const target = event.target;
const isDraggable =
!event.button &&
(!noDragClassName || !hasSelector(target, `.${noDragClassName}`, domNode)) &&