SafeEmbed: remove unnecessary conditional

This commit is contained in:
Alex Gleason 2022-08-23 10:27:12 -05:00
parent c79506e1fd
commit 83103294d3
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7

View file

@ -45,9 +45,7 @@ const SafeEmbed: React.FC<ISafeEmbed> = ({
}
return () => {
if (iframeDocument) {
iframe.current?.contentWindow?.removeEventListener('message', handleMessage);
}
iframe.current?.contentWindow?.removeEventListener('message', handleMessage);
};
}, [iframe.current, html]);