diff --git a/packages/core/src/utils/store.ts b/packages/core/src/utils/store.ts index 856ce678..7a1a1559 100644 --- a/packages/core/src/utils/store.ts +++ b/packages/core/src/utils/store.ts @@ -1,11 +1,11 @@ -import { unref } from 'vue' -import { ErrorCode, VueFlowError, connectionExists, getEdgeId, isEdge, parseEdge, parseNode } from '.' +import { toValue } from '@vueuse/core' +import { ErrorCode, VueFlowError, connectionExists, getEdgeId, isEdge, isNode, parseEdge, parseNode } from '.' import type { Actions, Connection, Edge, GraphEdge, GraphNode, Node, State } from '~/types' type NonUndefined = T extends undefined ? never : T export function isDef(val: T): val is NonUndefined { - const unrefVal = unref(val) + const unrefVal = toValue(val) return typeof unrefVal !== 'undefined' }