Optimize Transform

This commit is contained in:
2024-01-10 23:00:30 +08:00
parent 71052009ae
commit 309d5892c7
7 changed files with 111 additions and 107 deletions

View File

@@ -37,7 +37,7 @@ const Editor: React.FC<EditorProps> = ({
dispose: () => undefined
})
const { total, finished, onWatch } = useTypesProgress()
const file = files[selectedFileName] ?? { name: 'Untitled' }
const file = files[selectedFileName] || { name: 'Untitled' }
const handleOnEditorDidMount = (editor: editor.IStandaloneCodeEditor, monaco: Monaco) => {
editorRef.current = editor