fix editor

This commit is contained in:
Pompurin404 2025-01-10 18:37:04 +08:00
parent 7cece23769
commit c19fb6d989
No known key found for this signature in database

View File

@ -89,7 +89,7 @@ export const BaseEditor: React.FC<Props> = (props) => {
const trueTheme = theme === 'system' ? systemTheme : theme
const { value, readOnly = false, language, onChange } = props
const editorRef = useRef<monaco.editor.IStandaloneCodeEditor>()
const editorRef = useRef<monaco.editor.IStandaloneCodeEditor>(undefined)
const editorWillMount = (): void => {
monacoInitialization()
@ -141,6 +141,7 @@ export const BaseEditor: React.FC<Props> = (props) => {
}}
editorWillMount={editorWillMount}
editorDidMount={editorDidMount}
editorWillUnmount={(): void => { }}
onChange={onChange}
/>
)