From a34c0574e495ccb471fb4d256232096c8894c5e1 Mon Sep 17 00:00:00 2001 From: rozetko Date: Mon, 29 Jan 2024 20:01:22 +0300 Subject: [PATCH] hotfix --- react/ChartwerkLinePod.tsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/react/ChartwerkLinePod.tsx b/react/ChartwerkLinePod.tsx index 0c418b1..30f2158 100644 --- a/react/ChartwerkLinePod.tsx +++ b/react/ChartwerkLinePod.tsx @@ -17,7 +17,7 @@ export type ChartwerkLinePodProps = { } export function ChartwerkLinePod(props: ChartwerkLinePodProps) { - + const [pod, setPod] = useState(null); const [hack, setHack] = useState(null); @@ -47,8 +47,12 @@ export function ChartwerkLinePod(props: ChartwerkLinePodProps) { setPod(newPod); newPod.render(); } else { - pod.updateMarkers(props.markersConf); - pod.updateSegments(props.segments); + if(props.markersConf) { + pod.updateMarkers(props.markersConf); + } + if(props.segments) { + pod.updateSegments(props.segments); + } // TODO: actually it's wrong logic with updates // because it creates new pod anyway pod.updateData(props.series, props.options);