update: return vueFlow even if scope doesnt exist

This commit is contained in:
Braks
2022-03-23 06:47:57 +01:00
parent 8dcbb9704a
commit 3f5c7ea186
+1 -1
View File
@@ -57,8 +57,8 @@ export default <N = any, E = N>(options?: Partial<FlowOptions<N, E>>): UseVueFlo
if (!vueFlow || (vueFlow && options?.id && options.id !== vueFlow.id)) {
const name = options?.id ?? `vue-flow-${id++}`
vueFlow = storage.create(name, options)
if (scope) {
vueFlow = storage.create(name, options)
provide(VueFlow, storage.get(name))
scope.vueFlowId = name
}