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:
@@ -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}
|
||||
|
Reference in New Issue
Block a user