mirror of
https://gh.catmak.name/https://github.com/mihomo-party-org/mihomo-party
synced 2025-12-27 21:20:29 +08:00
fix editor
This commit is contained in:
parent
86393d7858
commit
9aec378756
@ -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}
|
||||
/>
|
||||
)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user