Fix the sidebar not desplayed when the path contains /locale (#20030)
Co-authored-by: Joshua Wehner <joshua@forem.com>
This commit is contained in:
parent
2a489210a2
commit
282004c72a
1 changed files with 5 additions and 1 deletions
|
|
@ -63,9 +63,13 @@ function trackTagCogIconClicks() {
|
|||
});
|
||||
}
|
||||
|
||||
function removeLocalePath(pathname) {
|
||||
return pathname.replace(/^\/locale\/[a-zA-Z-]+\/?/, '/');
|
||||
}
|
||||
|
||||
function renderSidebar() {
|
||||
const sidebarContainer = document.getElementById('sidebar-wrapper-right');
|
||||
const { pathname } = window.location;
|
||||
const pathname = removeLocalePath(window.location.pathname);
|
||||
|
||||
// If the screen's width is less than 640 we don't need this extra data.
|
||||
if (
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue