chore(core): cleanup useVueFlow
Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
@@ -137,11 +137,15 @@ export default (options?: FlowProps): VueFlowStore => {
|
|||||||
if (isParentScope) {
|
if (isParentScope) {
|
||||||
// dispose of state values and storage entry
|
// dispose of state values and storage entry
|
||||||
tryOnScopeDispose(() => {
|
tryOnScopeDispose(() => {
|
||||||
if (storage.get(vueFlow!.id)) {
|
if (vueFlow) {
|
||||||
vueFlow!.$destroy()
|
const storedInstance = storage.get(vueFlow.id)
|
||||||
}
|
|
||||||
|
|
||||||
vueFlow = null
|
if (storedInstance) {
|
||||||
|
storedInstance.$destroy()
|
||||||
|
} else {
|
||||||
|
warn(`No store instance found for id ${vueFlow.id} in storage.`)
|
||||||
|
}
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user