mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-04 08:28:11 +00:00
optimized code
This commit is contained in:
@@ -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 = () => {
|
||||
|
Reference in New Issue
Block a user