mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-26 23:34:45 +00:00
fix render file twice in list mode (#8169)
This commit is contained in:
@@ -1739,8 +1739,11 @@ class LibContentView extends React.Component {
|
||||
};
|
||||
|
||||
addDirent = (name, type, size) => {
|
||||
let item = this.createDirent(name, type, size);
|
||||
let direntList = this.state.direntList;
|
||||
if (direntList.some(item => item.name === name)) {
|
||||
return;
|
||||
}
|
||||
let item = this.createDirent(name, type, size);
|
||||
if (type === 'dir') {
|
||||
direntList.unshift(item);
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user