@ -143,6 +143,7 @@ class Editor extends Plugin {
this.on('fileManager', 'fileClosed', (name) => {
if (name === this.currentFile) {
this.currentFile = null
this.renderComponent()
}
})
this.on('theme', 'themeLoaded', (theme) => {
@ -228,7 +228,7 @@ export const EditorUI = (props: EditorUIProps) => {
useEffect(() => {
if (!editorRef.current) return
if (!editorRef.current || !props.currentFile) return
currentFileRef.current = props.currentFile
const file = editorModelsState[props.currentFile]
editorRef.current.setModel(file.model)