diff --git a/src/renderer/src/components/base/base-editor.tsx b/src/renderer/src/components/base/base-editor.tsx index e3283281..e2a2d118 100644 --- a/src/renderer/src/components/base/base-editor.tsx +++ b/src/renderer/src/components/base/base-editor.tsx @@ -89,7 +89,7 @@ export const BaseEditor: React.FC = (props) => { const trueTheme = theme === 'system' ? systemTheme : theme const { value, readOnly = false, language, onChange } = props - const editorRef = useRef() + const editorRef = useRef(undefined) const editorWillMount = (): void => { monacoInitialization() @@ -141,6 +141,7 @@ export const BaseEditor: React.FC = (props) => { }} editorWillMount={editorWillMount} editorDidMount={editorDidMount} + editorWillUnmount={(): void => { }} onChange={onChange} /> )