From f842a6b4f3a5872a9f25fe95b60c77104bc749ce Mon Sep 17 00:00:00 2001 From: cyrbuzz Date: Mon, 15 Jan 2024 14:39:50 +0800 Subject: [PATCH] fix: hidden useless error --- src/hooks/useStudio.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/hooks/useStudio.ts b/src/hooks/useStudio.ts index 9185d30da..b453b35e4 100644 --- a/src/hooks/useStudio.ts +++ b/src/hooks/useStudio.ts @@ -13,8 +13,12 @@ export function useStudioEnabled() { const checkStudioEnabled = useCallback(async () => { if (!contracts || !account) return; - const studioEnabled = await contracts.queryRegistry.creatorWhitelist(account); - setStudioEnabled(studioEnabled); + try { + const studioEnabled = await contracts.queryRegistry.creatorWhitelist(account); + setStudioEnabled(studioEnabled); + } catch (e) { + // don't care this error + } }, [contracts, account]); useEffect(() => {