mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-07 18:03:48 +00:00
repair null repo create md bug (#2917)
This commit is contained in:
@@ -179,6 +179,14 @@ class DirentListView extends React.Component {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
checkDuplicatedName = (newName) => {
|
||||||
|
let direntList = this.props.direntList;
|
||||||
|
let isDuplicated = direntList.some(object => {
|
||||||
|
return object.name === newName;
|
||||||
|
});
|
||||||
|
return isDuplicated;
|
||||||
|
}
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { direntList, sortBy, sortOrder } = this.props;
|
const { direntList, sortBy, sortOrder } = this.props;
|
||||||
|
|
||||||
@@ -199,6 +207,7 @@ class DirentListView extends React.Component {
|
|||||||
parentPath={this.props.path}
|
parentPath={this.props.path}
|
||||||
fileType={this.state.fileType}
|
fileType={this.state.fileType}
|
||||||
onAddFile={this.onAddFile}
|
onAddFile={this.onAddFile}
|
||||||
|
checkDuplicatedName={this.checkDuplicatedName}
|
||||||
addFileCancel={this.onCreateFileToggle}
|
addFileCancel={this.onCreateFileToggle}
|
||||||
/>
|
/>
|
||||||
</ModalPortal>
|
</ModalPortal>
|
||||||
|
Reference in New Issue
Block a user