mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-07 18:03:48 +00:00
fix wiki bug (#7189)
This commit is contained in:
@@ -111,6 +111,9 @@ const getPaths = (navigation, currentPageId, pages, isGetPathStr) => {
|
|||||||
const getNamePaths = (config, pageId) => {
|
const getNamePaths = (config, pageId) => {
|
||||||
const { navigation, pages } = config;
|
const { navigation, pages } = config;
|
||||||
const { paths, curNode } = getPaths(navigation, pageId, pages, true);
|
const { paths, curNode } = getPaths(navigation, pageId, pages, true);
|
||||||
|
if (!paths || !curNode) {
|
||||||
|
return { path: null, isDir: false };
|
||||||
|
}
|
||||||
const pathArr = paths.split('-');
|
const pathArr = paths.split('-');
|
||||||
const nameArr = [];
|
const nameArr = [];
|
||||||
if (pathArr.length > 1) {
|
if (pathArr.length > 1) {
|
||||||
|
@@ -1399,7 +1399,13 @@ export const Utils = {
|
|||||||
errorMsg = gettext('Error');
|
errorMsg = gettext('Error');
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
errorMsg = gettext('Please check the network.');
|
if (typeof error === 'object' && error.name) {
|
||||||
|
errorMsg = error.name;
|
||||||
|
} else {
|
||||||
|
errorMsg = gettext('Please check the network.');
|
||||||
|
}
|
||||||
|
// eslint-disable-next-line
|
||||||
|
console.log(error);
|
||||||
}
|
}
|
||||||
return errorMsg;
|
return errorMsg;
|
||||||
},
|
},
|
||||||
|
Reference in New Issue
Block a user