From 2682ee93c6d462ca9c143b0dc34a63b38fb521e1 Mon Sep 17 00:00:00 2001 From: c-bata Date: Mon, 19 Aug 2024 22:47:30 +0900 Subject: [PATCH] Catch error inside parallel coordinate plot --- .../src/components/PlotParallelCoordinate.tsx | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/tslib/react/src/components/PlotParallelCoordinate.tsx b/tslib/react/src/components/PlotParallelCoordinate.tsx index f2a14dc6..572c4eff 100644 --- a/tslib/react/src/components/PlotParallelCoordinate.tsx +++ b/tslib/react/src/components/PlotParallelCoordinate.tsx @@ -37,9 +37,17 @@ export const PlotParallelCoordinate: FC<{ const trials = useFilteredTrials(study, targets, false) useEffect(() => { if (study !== null && graphComponentState !== "componentWillMount") { - plotCoordinate(study, trials, targets, searchSpace, colorThemeUsed)?.then( - notifyGraphDidRender - ) + try { + plotCoordinate( + study, + trials, + targets, + searchSpace, + colorThemeUsed + )?.then(notifyGraphDidRender) + } catch (e) { + console.error(e) + } } }, [ study,