mirror of
https://gh.catmak.name/https://github.com/mihomo-party-org/mihomo-party
synced 2025-12-26 20:50:30 +08:00
fix editor
This commit is contained in:
parent
7cece23769
commit
c19fb6d989
@ -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