Skip to content

Commit 584782b

Browse files
committed
refactor(core): call nodes initialized whenever areNodesInitialized is true
1 parent 417a301 commit 584782b

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

packages/core/src/container/NodeRenderer/NodeRenderer.vue

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script lang="ts" setup>
22
import { getCurrentInstance, inject, nextTick, onBeforeUnmount, onMounted, ref, resolveComponent } from 'vue'
3-
import { until } from '@vueuse/core'
3+
import { whenever } from '@vueuse/core'
44
import { NodeWrapper } from '../../components'
55
import type { GraphNode, HandleConnectable, NodeComponent } from '../../types'
66
import { Slots } from '../../context'
@@ -26,13 +26,14 @@ const resizeObserver = ref<ResizeObserver>()
2626
2727
const instance = getCurrentInstance()
2828
29-
until(() => areNodesInitialized.value)
30-
.toBe(true)
31-
.then(() => {
29+
whenever(
30+
() => areNodesInitialized.value,
31+
() => {
3232
nextTick(() => {
3333
emits.nodesInitialized(getNodesInitialized.value)
3434
})
35-
})
35+
},
36+
)
3637
3738
onMounted(() => {
3839
resizeObserver.value = new ResizeObserver((entries) => {

0 commit comments

Comments
 (0)