1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-01 15:09:14 +00:00

[dir view] 'column' mode: fixup for node not loaded when update the node tree after 'move/copy' (#5632)

This commit is contained in:
llj
2023-09-07 15:39:48 +08:00
committed by GitHub
parent 3a80637d49
commit cd3ede438f

View File

@@ -563,6 +563,11 @@ class LibContentView extends React.Component {
let tree = this.state.treeData.clone();
let node = tree.getNodeByPath(path);
// for node not loaded, such as a deep folder '/vv/aa'
if (!node) { // node: null
return false;
}
let nodeChildren = node.children.map(item => item.object);
let nodeChildrenNames = nodeChildren.map(item => item.name);