Avoid dotPath confusions

This commit is contained in:
Thomas Nordquist
2019-06-17 19:11:58 +02:00
parent 06ab52bb6b
commit 449d046ce3

View File

@@ -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])