From 449d046ce3c9852256c37c9c4bada7e3a19663f8 Mon Sep 17 00:00:00 2001 From: Thomas Nordquist Date: Mon, 17 Jun 2019 19:11:58 +0200 Subject: [PATCH] Avoid dotPath confusions --- app/src/components/Sidebar/CodeDiff/ChartPreview.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/components/Sidebar/CodeDiff/ChartPreview.tsx b/app/src/components/Sidebar/CodeDiff/ChartPreview.tsx index 9549f8e..4c87183 100644 --- a/app/src/components/Sidebar/CodeDiff/ChartPreview.tsx +++ b/app/src/components/Sidebar/CodeDiff/ChartPreview.tsx @@ -24,7 +24,7 @@ function ChartPreview(props: Props) { const onClick = React.useCallback(() => { props.actions.chart.addChart({ topic: props.treeNode.path(), - dotPath: props.literal.path, + dotPath: props.literal.path !== '' ? props.literal.path : undefined, }) setOpen(false) }, [props.literal.path, props.treeNode])