Skip to content

Commit 1139280

Browse files
committed
Make redirect tolowercase to fix some edge cases
1 parent ef70cb9 commit 1139280

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/pages/maps.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import Layout from '~/layouts/layout.astro';
2222
const params = getUrlParams();
2323
if (params.view) {
2424
// Construct the new URL using the 'view' parameter
25-
const targetUrl = '/boards/' + encodeURIComponent(params.view);
25+
const targetUrl = '/boards/' + encodeURIComponent(params.view.toLowerCase());
2626
// Redirect to the target URL
2727
window.location.href = targetUrl;
2828
} else {
@@ -32,7 +32,7 @@ import Layout from '~/layouts/layout.astro';
3232
const params = getUrlParams();
3333
const element = document.getElementById('redirect-link') as HTMLAnchorElement;
3434
if (params.view) {
35-
element.href = '/boards/' + encodeURIComponent(params.view);
35+
element.href = '/boards/' + encodeURIComponent(params.view.toLowerCase());
3636
} else {
3737
element.innerText = 'View parameter is missing.';
3838
}

0 commit comments

Comments
 (0)