SafeEmbed: remove unnecessary conditional

This commit is contained in:
Alex Gleason
2022-08-23 10:27:12 -05:00
parent c79506e1fd
commit 83103294d3

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]);