From b25b54b79e7650c24f61c665c4fac1a743804e88 Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Mon, 26 Dec 2022 20:21:16 +0800 Subject: [PATCH] Silent fail for custom emojis fetch --- src/components/compose.jsx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/components/compose.jsx b/src/components/compose.jsx index fab3ce6b..d1ea1c02 100644 --- a/src/components/compose.jsx +++ b/src/components/compose.jsx @@ -90,9 +90,14 @@ function Compose({ const customEmojis = useRef(); useEffect(() => { (async () => { - const emojis = await masto.v1.customEmojis.list(); - console.log({ emojis }); - customEmojis.current = emojis; + try { + const emojis = await masto.v1.customEmojis.list(); + console.log({ emojis }); + customEmojis.current = emojis; + } catch (e) { + // silent fail + console.error(e); + } })(); }, []);