1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-04 08:28:11 +00:00

optimized code

This commit is contained in:
shanshuirenjia
2019-05-29 15:57:45 +08:00
parent b83a4fd583
commit fb53e41a18

View File

@@ -78,31 +78,17 @@ class Wiki extends Component {
loadSidePanel = (initialPath) => {
if (initialPath === this.homePath) {
if (hasIndex) {
this.loadIndexNode();
} else {
if (hasIndex) {
this.loadIndexNode();
} else {
if (isDir === 'none') {
initialPath = '/';
this.loadNodeAndParentsByPath('/');
} else {
this.loadNodeAndParentsByPath(initialPath);
}
}
if (initialPath !== this.homePath) {
if (isDir === 'None') {
if (hasIndex) {
this.loadIndexNode();
} else {
initialPath = '/';
this.loadNodeAndParentsByPath(initialPath);
}
} else {
if (hasIndex) {
this.loadIndexNode();
} else {
this.loadNodeAndParentsByPath(initialPath);
}
}
}
}
loadIndexNode = () => {