diff --git a/site/theme/template/Content/MainContent.jsx b/site/theme/template/Content/MainContent.jsx index 187b24246c..09ba1f1064 100644 --- a/site/theme/template/Content/MainContent.jsx +++ b/site/theme/template/Content/MainContent.jsx @@ -153,7 +153,7 @@ export default class MainContent extends React.Component { const result = [...topLevel]; result.forEach((item, i) => { const insertCategory = categories.filter( - cat => (themeConfig.categoryOrder[cat] ? themeConfig.categoryOrder[cat] < i : i === result.length - 1) + cat => (themeConfig.categoryOrder[cat] ? themeConfig.categoryOrder[cat] <= i : i === result.length - 1) )[0]; if (insertCategory) { const target = ( @@ -161,7 +161,7 @@ export default class MainContent extends React.Component { {this.generateSubMenuItems(menuItems[insertCategory])} ); - result.splice(i, 0, target); + result.splice(i + 1, 0, target); categories.splice(categories.indexOf(insertCategory), 1); } });