Skip to content

Commit 4b2a978

Browse files
committed
refactor(core): immediately set initialized flag
Signed-off-by: braks <[email protected]>
1 parent b5103db commit 4b2a978

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/core/src/store/actions.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ export function useActions(state: State, getters: ComputedGetters): Actions {
125125
node.handleBounds.source = getHandleBounds('.source', update.nodeElement, zoom)
126126
node.handleBounds.target = getHandleBounds('.target', update.nodeElement, zoom)
127127
node.dimensions = dimensions
128+
node.initialized = true
128129

129130
res.push({
130131
id: node.id,
@@ -261,7 +262,7 @@ export function useActions(state: State, getters: ComputedGetters): Actions {
261262
const setNodeExtent: Actions['setNodeExtent'] = async (nodeExtent) => {
262263
state.nodeExtent = nodeExtent
263264

264-
const nodeIds = getters.getNodes.value.map((n) => n.id)
265+
const nodeIds = getters.getNodes.value.filter((n) => n.initialized).map((n) => n.id)
265266
updateNodeInternals(nodeIds)
266267
}
267268

0 commit comments

Comments
 (0)