mirror of
https://github.com/haiwen/seahub.git
synced 2025-08-31 22:54:11 +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() {
|
||||
const { direntList, sortBy, sortOrder } = this.props;
|
||||
|
||||
@@ -199,6 +207,7 @@ class DirentListView extends React.Component {
|
||||
parentPath={this.props.path}
|
||||
fileType={this.state.fileType}
|
||||
onAddFile={this.onAddFile}
|
||||
checkDuplicatedName={this.checkDuplicatedName}
|
||||
addFileCancel={this.onCreateFileToggle}
|
||||
/>
|
||||
</ModalPortal>
|
||||
|
Reference in New Issue
Block a user