Skip to content

Commit

Permalink
Make redirect tolowercase to fix some edge cases
Browse files Browse the repository at this point in the history
  • Loading branch information
Deflaktor committed Jul 15, 2024
1 parent ef70cb9 commit 1139280
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pages/maps.astro
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import Layout from '~/layouts/layout.astro';
const params = getUrlParams();
if (params.view) {
// Construct the new URL using the 'view' parameter
const targetUrl = '/boards/' + encodeURIComponent(params.view);
const targetUrl = '/boards/' + encodeURIComponent(params.view.toLowerCase());
// Redirect to the target URL
window.location.href = targetUrl;
} else {
Expand All @@ -32,7 +32,7 @@ import Layout from '~/layouts/layout.astro';
const params = getUrlParams();
const element = document.getElementById('redirect-link') as HTMLAnchorElement;
if (params.view) {
element.href = '/boards/' + encodeURIComponent(params.view);
element.href = '/boards/' + encodeURIComponent(params.view.toLowerCase());
} else {
element.innerText = 'View parameter is missing.';
}
Expand Down

0 comments on commit 1139280

Please sign in to comment.