From bf3f5b0a661f5c25514411680f4624a581d541a6 Mon Sep 17 00:00:00 2001 From: sajald77 Date: Tue, 5 Sep 2023 19:16:28 -0400 Subject: [PATCH] fix: unhandled error --- src/forms/markdown/helpers/StyleProvider.tsx | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/forms/markdown/helpers/StyleProvider.tsx b/src/forms/markdown/helpers/StyleProvider.tsx index 843e3768a..12c96e6e8 100644 --- a/src/forms/markdown/helpers/StyleProvider.tsx +++ b/src/forms/markdown/helpers/StyleProvider.tsx @@ -65,13 +65,15 @@ export const StyleProvider = ({ ) useEffect(() => { - twttr.widgets - .load(document.getElementById(ID.project.story.markdown.container)) - .catch((e: any) => - captureException(e, { - tags: { area: 'twitter-widgets' }, - }), + try { + twttr.widgets.load( + document.getElementById(ID.project.story.markdown.container), ) + } catch (e) { + captureException(e, { + tags: { area: 'twitter-widgets' }, + }) + } }, []) return (