Skip to content

Commit

Permalink
Merge pull request #4789 from jeradrutnam/master
Browse files Browse the repository at this point in the history
Fix auto updating trailing slash page redirect issue
  • Loading branch information
jeradrutnam authored Sep 27, 2024
2 parents 42b71a5 + 63e3051 commit 04c5d08
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion en/theme/material/partials/javascripts/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
});
</script>

0 comments on commit 04c5d08

Please sign in to comment.