We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ac04222 commit 43021beCopy full SHA for 43021be
src/pages/session/[slug].astro
@@ -235,14 +235,10 @@ const nextSessionsOrdered = sameRoomNextSession
235
</Layout>
236
237
<script is:inline define:vars={{ slug }}>
238
- // Check if the current URL contains the entry ID
239
const currentUrl = window.location.pathname;
240
const expectedUrl = `/session/${slug}`;
241
242
- // If the URL doesn't match the expected URL with the entry ID, replace it
243
if (currentUrl !== expectedUrl) {
244
- // Use history.replaceState to update the URL without refreshing the page
245
window.history.replaceState({}, '', expectedUrl);
246
- console.log(`URL updated to match entry ID: ${expectedUrl}`);
247
}
248
</script>
0 commit comments