diff --git a/package.json b/package.json index 8b557cf0..f78d4fa1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "json-schema-studio", - "version": "0.5.14-beta", + "version": "0.5.15-beta", "type": "module", "homepage": "studio.ioflux.org", "repository": "https://github.com/ioflux-org/studio-json-schema", diff --git a/src/components/GraphView.tsx b/src/components/GraphView.tsx index 3411df0e..73f0acbd 100644 --- a/src/components/GraphView.tsx +++ b/src/components/GraphView.tsx @@ -37,7 +37,6 @@ import { CgClose } from "react-icons/cg"; import { extractKeywords } from "../utils/searchNodeHelpers"; const nodeTypes = { customNode: CustomNode }; -const dagreGraph = new dagre.graphlib.Graph().setDefaultEdgeLabel(() => ({})); const NODE_WIDTH = 172; const NODE_HEIGHT = 36; @@ -140,6 +139,7 @@ const GraphView = ({ const getLayoutedElements = useCallback( (nodes: GraphNode[], edges: GraphEdge[], direction = "LR") => { + const dagreGraph = new dagre.graphlib.Graph().setDefaultEdgeLabel(() => ({})); const isHorizontal = direction === "LR"; dagreGraph.setGraph({ rankdir: direction });