fix(svelte) fix getIntersectingNodes, closes #3675

This commit is contained in:
Peter
2023-11-28 14:45:21 +01:00
parent 8fe8f73ed3
commit 1eea7209a3

View File

@@ -136,12 +136,12 @@ export function useSvelteFlow(): {
) => {
const [nodeRect, node, isRect] = getNodeRect(nodeOrRect);
if (!nodeRect || !node) {
if (!nodeRect) {
return [];
}
return (nodesToIntersect || get(nodes)).filter((n) => {
if (!isRect && (n.id === node.id || !n.computed?.positionAbsolute)) {
if (!isRect && (n.id === node!.id || !n.computed?.positionAbsolute)) {
return false;
}