chore(core): cleanup
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { toRef, until } from '@vueuse/core'
|
import { toRef, until } from '@vueuse/core'
|
||||||
import { computed, onBeforeUnmount, ref } from 'vue'
|
import { computed, onUnmounted, ref } from 'vue'
|
||||||
import type { HandleProps } from '../../types/handle'
|
import type { HandleProps } from '../../types/handle'
|
||||||
import { Position } from '../../types'
|
import { Position } from '../../types'
|
||||||
import { useHandle, useNode, useVueFlow } from '../../composables'
|
import { useHandle, useNode, useVueFlow } from '../../composables'
|
||||||
@@ -131,7 +131,7 @@ until(() => node.initialized)
|
|||||||
node.handleBounds[type.value] = [...(node.handleBounds[type.value] ?? []), nextBounds]
|
node.handleBounds[type.value] = [...(node.handleBounds[type.value] ?? []), nextBounds]
|
||||||
})
|
})
|
||||||
|
|
||||||
onBeforeUnmount(() => {
|
onUnmounted(() => {
|
||||||
// clean up node internals
|
// clean up node internals
|
||||||
const handleBounds = node.handleBounds[type.value]
|
const handleBounds = node.handleBounds[type.value]
|
||||||
if (handleBounds) {
|
if (handleBounds) {
|
||||||
|
|||||||
Reference in New Issue
Block a user