From 27c01cfb284269996e48211414d2b9f6a69ef6b8 Mon Sep 17 00:00:00 2001 From: Sylvie Crowe <107814465+oneirocosm@users.noreply.github.com> Date: Thu, 20 Feb 2025 12:09:50 -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 ce12e3c4a..8e202de8c 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;