Skip to content

Commit e2ce205

Browse files
committed
fix(core): correct id access in useVueFlow (#1483)
* fix(core): correct id access in `useVueFlow` * chore(changeset): add
1 parent aab43d5 commit e2ce205

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.changeset/mean-horses-swim.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@vue-flow/core": patch
3+
---
4+
5+
Correct access of options id in `useVueFlow`

packages/core/src/composables/useVueFlow.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ export function useVueFlow(idOrOpts?: any): VueFlowStore {
3030

3131
const isOptsObj = typeof idOrOpts === 'object'
3232

33-
const options = isOptsObj ? idOrOpts : undefined
33+
const options = isOptsObj ? idOrOpts : { id: idOrOpts }
3434

35-
const id = options?.id ?? idOrOpts
35+
const id = options.id
3636
const vueFlowId = scope?.vueFlowId || id
3737

3838
let vueFlow: Injection

0 commit comments

Comments
 (0)