From 54c27c021bdc03348184711a26e0d6023f53710a Mon Sep 17 00:00:00 2001 From: Francisco Salgueiro Date: Sun, 29 Oct 2023 15:01:14 +0000 Subject: [PATCH] fix crash on databse panel --- src/components/panels/database/DatabasePanel.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/panels/database/DatabasePanel.tsx b/src/components/panels/database/DatabasePanel.tsx index 99f62086..e529700f 100644 --- a/src/components/panels/database/DatabasePanel.tsx +++ b/src/components/panels/database/DatabasePanel.tsx @@ -215,16 +215,17 @@ function PanelWithError(props: { children: React.ReactNode; }) { const referenceDatabase = useAtomValue(referenceDbAtom); + let children = props.children; if (props.type === "local" && !referenceDatabase) { - props.children = ; + children = ; } if (props.error && props.type !== "local") { - props.children = {props.error.toString()}; + children = {props.error.toString()}; } return ( - {props.children} + {children} ); }