SafeEmbed: remove unnecessary conditional
This commit is contained in:
@ -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]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user