From ad13f90374ae053f5ee1e1969cabafbd947747d8 Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Mon, 6 Feb 2023 19:54:35 +0800 Subject: [PATCH] Fix info stays when there's error --- src/components/account.jsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/account.jsx b/src/components/account.jsx index f5ea56de..5c66ccf9 100644 --- a/src/components/account.jsx +++ b/src/components/account.jsx @@ -45,9 +45,11 @@ function Account({ account, instance: propInstance, onClose }) { setUIState('default'); return; } + setInfo(null); setUIState('error'); } catch (err) { console.error(err); + setInfo(null); setUIState('error'); } }