refactor(core): separate model and store watchers

Signed-off-by: braks <78412429+bcakmakoglu@users.noreply.github.com>
This commit is contained in:
braks
2022-12-09 20:42:56 +01:00
committed by Braks
parent 1ca8c2a9be
commit 473fd83c59
3 changed files with 74 additions and 60 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
import type { Connection, CoordinateExtent, Edge, Getters, GraphEdge, GraphNode, Node } from '~/types'
export const isDef = <T>(val: T): val is NonNullable<T> => typeof val !== 'undefined'
export const isDef = <T>(val: T): val is NonNullable<T> => typeof unref(val) !== 'undefined'
export const addEdgeToStore = (edgeParams: Edge | Connection, edges: Edge[]) => {
if (!edgeParams.source || !edgeParams.target) {