From 83103294d32cdac318c134092b420a479eaf8334 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Tue, 23 Aug 2022 10:27:12 -0500 Subject: [PATCH] SafeEmbed: remove unnecessary conditional --- app/soapbox/components/safe-embed.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/soapbox/components/safe-embed.tsx b/app/soapbox/components/safe-embed.tsx index 23fbded14..b794bbed2 100644 --- a/app/soapbox/components/safe-embed.tsx +++ b/app/soapbox/components/safe-embed.tsx @@ -45,9 +45,7 @@ const SafeEmbed: React.FC = ({ } return () => { - if (iframeDocument) { - iframe.current?.contentWindow?.removeEventListener('message', handleMessage); - } + iframe.current?.contentWindow?.removeEventListener('message', handleMessage); }; }, [iframe.current, html]);