From ae650485a0f9484a01078d96e86b74fbf9f5eb42 Mon Sep 17 00:00:00 2001 From: xrkffgg Date: Fri, 28 Aug 2020 22:55:16 +0800 Subject: [PATCH] docs: optimize site menu sort (#26471) --- site/theme/template/Content/MainContent.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/theme/template/Content/MainContent.jsx b/site/theme/template/Content/MainContent.jsx index 574b9dc9cc..dc514fbcc8 100644 --- a/site/theme/template/Content/MainContent.jsx +++ b/site/theme/template/Content/MainContent.jsx @@ -135,7 +135,7 @@ class MainContent extends Component { return ( {menuItem.children - .sort((a, b) => a.title.charCodeAt(0) - b.title.charCodeAt(0)) + .sort((a, b) => a.title.localeCompare(b.title)) .map(leaf => this.generateMenuItem(false, leaf, footerNavIcons))} );