From 63e305161fbb80a1a7e60fde0746ea358d37b3fc Mon Sep 17 00:00:00 2001 From: Jerad Rutnam Date: Fri, 27 Sep 2024 08:51:00 +0530 Subject: [PATCH] Fix auto updating trailing slash page redirect issue --- en/theme/material/partials/javascripts/base.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/en/theme/material/partials/javascripts/base.html b/en/theme/material/partials/javascripts/base.html index adaafb28b7..92e921d0e6 100644 --- a/en/theme/material/partials/javascripts/base.html +++ b/en/theme/material/partials/javascripts/base.html @@ -5,7 +5,7 @@ // Check if the path does not end with a slash and has no file extension if (!window.location.pathname.endsWith('/') && !window.location.pathname.split('/').pop().includes('.')) { var newPath = window.location.pathname + '/' + window.location.search + window.location.hash; - window.history.replaceState({}, document.title, newPath); + window.location.href = newPath; } });