Fix links sometimes using nodes that were removed
This commit is contained in:
parent
4058fad711
commit
2c14b2193d
1 changed files with 3 additions and 3 deletions
|
@ -43,9 +43,9 @@ function updateNodes() {
|
||||||
isDirty = false;
|
isDirty = false;
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
boundingRect.value = resizeListener.value?.getBoundingClientRect();
|
boundingRect.value = resizeListener.value?.getBoundingClientRect();
|
||||||
(Object.values(nodes.value) as FeatureNode[]).forEach(
|
(Object.values(nodes.value) as FeatureNode[])
|
||||||
node => (node.rect = node.element.getBoundingClientRect())
|
.filter(n => n) // Sometimes the values become undefined
|
||||||
);
|
.forEach(node => (node.rect = node.element.getBoundingClientRect()));
|
||||||
isDirty = true;
|
isDirty = true;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue