1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-24 10:27:10 +02:00

Desktop: Fixes #8961: Fix rare crash when developing a plugin

This commit is contained in:
Laurent Cozic 2023-11-09 12:24:49 +00:00
parent 76a8ae3a83
commit e22aa4f6e9

View File

@ -32,7 +32,7 @@ export default function(frameWindow: any, isReady: boolean, postMessage: Functio
frameWindow.addEventListener('message', onMessage);
return () => {
frameWindow.removeEventListener('message', onMessage);
if (frameWindow.removeEventListener) frameWindow.removeEventListener('message', onMessage);
};
}, [frameWindow, htmlHash]);