Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
Leabenisty committed Jul 10, 2024
1 parent 87c8d7c commit 38be9f8
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions 404.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,11 @@
// Construct the target redirect URL
const redirectTo = base + pathname;

// Redirect to the target URL
window.location.replace(redirectTo);
// Only redirect if not already at the correct URL
if (window.location.href !== redirectTo) {
// Redirect to the target URL
window.location.replace(redirectTo);
}
</script>
</head>
<body>
Expand Down

0 comments on commit 38be9f8

Please sign in to comment.