From c9f647d7e7c069aed5ed30f581e20b9eb2bb1ee2 Mon Sep 17 00:00:00 2001 From: Sylvia Crowe Date: Thu, 20 Feb 2025 11:52:24 -0800 Subject: [PATCH] fix: dismiss the error when changing path The error overlay used to persist even after the path was changed. This changes this behavior so it is automatically dismissed when changing the path. --- frontend/app/view/preview/preview.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/app/view/preview/preview.tsx b/frontend/app/view/preview/preview.tsx index ce12e3c4ad..8e202de8cd 100644 --- a/frontend/app/view/preview/preview.tsx +++ b/frontend/app/view/preview/preview.tsx @@ -1069,12 +1069,13 @@ function PreviewView({ model: PreviewModel; }) { const connStatus = useAtomValue(model.connStatus); + const filePath = useAtomValue(model.metaFilePath); const [errorMsg, setErrorMsg] = useAtom(model.errorMsgAtom); const connection = useAtomValue(model.connectionImmediate); useEffect(() => { setErrorMsg(null); - }, [connection]); + }, [connection, filePath]); if (connStatus?.status != "connected") { return null;