tsc fixes and rules
This commit is contained in:
@@ -103,7 +103,7 @@ export default function Graph({ setGraphPath }: { setGraphPath: React.Dispatch<R
|
||||
graphsPath.push(createPathSegment(nodeContext.nodeId, nodeContext.nodeName));
|
||||
setGraphsPath([...graphsPath])
|
||||
}
|
||||
const state = useGraphsStore.getState();
|
||||
const state = useGraphsStore.getState() as { graphsById: Map<string, GraphModel> };
|
||||
const graphsById = state.graphsById;
|
||||
const graph = graphsById.get(graphId);
|
||||
if (graph) {
|
||||
@@ -118,8 +118,8 @@ export default function Graph({ setGraphPath }: { setGraphPath: React.Dispatch<R
|
||||
const svgElement = await viz.renderSVGElement(dot, { engine: 'dot' });
|
||||
const container = containerRef.current;
|
||||
if (!container) return;
|
||||
container.innerHTML = '';
|
||||
container.appendChild(svgElement);
|
||||
(container as HTMLElement).innerHTML = '';
|
||||
(container as HTMLElement).appendChild(svgElement);
|
||||
attachInteractions(svgElement);
|
||||
} catch (e) {
|
||||
console.error('Viz render error', e);
|
||||
|
||||
Reference in New Issue
Block a user