Commit 804d1d02 authored by 邓晓峰's avatar 邓晓峰

fix: generMenu bug

parent c7e7625c
Pipeline #23285 skipped with stages
......@@ -89,16 +89,15 @@ const appReducer = (state = initialState, action) => {
// eslint-disable-next-line no-undef,no-case-declarations
const config = window.globalConfig;
// eslint-disable-next-line no-case-declarations
let generMenu = generRoutes(config.widgets || []);
const generMenu = generRoutes(config.widgets || []);
// eslint-disable-next-line no-case-declarations
const { homepage } = window.globalConfig;
if (homepage !== '') {
const index = generMenu.findIndex(
item => item.level === -1 && item.url !== '',
);
if (index > -1) {
generMenu = generMenu.reverse();
}
// const index = generMenu.findIndex(item => item.level === -1);
// if (index > -1) {
// generMenu = generMenu.reverse();
// }
}
// eslint-disable-next-line no-case-declarations
const flatMenu = generFlatRoutes(generMenu || []);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment