1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-09 10:50:24 +00:00

repair code bug

This commit is contained in:
杨顺强
2024-01-19 15:26:34 +08:00
parent dd5354a216
commit 5bcdf83b28

View File

@@ -470,6 +470,10 @@ class MarkdownEditor extends React.Component {
});
};
getFileName = (fileName) => {
return fileName.substring(0, fileName.lastIndexOf('.'));
};
render() {
const { loading, editorMode, markdownContent, fileInfo, fileTagList } = this.state;
@@ -504,7 +508,7 @@ class MarkdownEditor extends React.Component {
ref={this.editorRef}
mode={editorMode}
isFetching={loading}
initValue={fileName}
initValue={this.getFileName(fileName)}
value={markdownContent}
editorApi={editorApi}
onSave={this.onSaveEditorContent}