mirror of
https://github.com/laurent22/joplin.git
synced 2024-12-24 10:27:10 +02:00
Chore: Fixes
This commit is contained in:
parent
fce571f38c
commit
a40a5ef3bf
@ -220,7 +220,7 @@ function Editor(props: EditorProps, ref: any) {
|
||||
cm.off('refresh', editor_resize);
|
||||
cm.off('update', editor_update);
|
||||
// eslint-disable-next-line @seiyab/react-hooks/exhaustive-deps -- Old code before rule was applied
|
||||
editorParent.current.removeChild(cm.getWrapperElement());
|
||||
if (editorParent.current) editorParent.current.removeChild(cm.getWrapperElement());
|
||||
setEditor(null);
|
||||
};
|
||||
// eslint-disable-next-line @seiyab/react-hooks/exhaustive-deps -- Old code before rule was applied
|
||||
|
@ -41,10 +41,12 @@ export default function useViewIsReady(viewRef: any) {
|
||||
viewRef.current.contentWindow.addEventListener('message', onMessage);
|
||||
|
||||
return () => {
|
||||
viewRef.current.removeEventListener('dom-ready', onIFrameReady);
|
||||
viewRef.current.removeEventListener('load', onIFrameReady);
|
||||
// eslint-disable-next-line @seiyab/react-hooks/exhaustive-deps -- Old code before rule was applied
|
||||
viewRef.current.contentWindow.removeEventListener('message', onMessage);
|
||||
if (viewRef.current) {
|
||||
viewRef.current.removeEventListener('dom-ready', onIFrameReady);
|
||||
viewRef.current.removeEventListener('load', onIFrameReady);
|
||||
// eslint-disable-next-line @seiyab/react-hooks/exhaustive-deps -- Old code before rule was applied
|
||||
viewRef.current.contentWindow.removeEventListener('message', onMessage);
|
||||
}
|
||||
};
|
||||
// eslint-disable-next-line @seiyab/react-hooks/exhaustive-deps -- Old code before rule was applied
|
||||
}, []);
|
||||
|
@ -114,7 +114,7 @@ const execApi = async (method: HttpMethod, path: string, body: Record<string, st
|
||||
throw error;
|
||||
}
|
||||
|
||||
return response.json();
|
||||
return response.json() as any;
|
||||
};
|
||||
|
||||
const getForumTopPostByExternalId = async (externalId: string): Promise<ForumTopPost> => {
|
||||
|
Loading…
Reference in New Issue
Block a user