diff --git a/examples/UpdateNode/UpdateNodeExample.vue b/examples/UpdateNode/UpdateNodeExample.vue index fa703e4a..c4c4ae88 100644 --- a/examples/UpdateNode/UpdateNodeExample.vue +++ b/examples/UpdateNode/UpdateNodeExample.vue @@ -29,23 +29,20 @@ const updateNode = () => { return el }) } - -watchEffect(() => { - updateNode() -}) +onMounted(updateNode) diff --git a/examples/UpdateNodeInternals/UpdateNodeInternalsExample.vue b/examples/UpdateNodeInternals/UpdateNodeInternalsExample.vue index 1fe64870..245a67c9 100644 --- a/examples/UpdateNodeInternals/UpdateNodeInternalsExample.vue +++ b/examples/UpdateNodeInternals/UpdateNodeInternalsExample.vue @@ -47,10 +47,7 @@ const onPaneClick = (evt: MouseEvent) => const toggleHandleCount = () => (elements.value = elements.value.map((el) => { - if (isEdge(el)) { - return el - } - + if (isEdge(el)) return el return { ...el, data: { ...el.data, handleCount: el.data?.handleCount === 1 ? 2 : 1 } } }))