Skip to content

Commit

Permalink
Fix check route in middleware
Browse files Browse the repository at this point in the history
  • Loading branch information
pheralb committed Mar 30, 2024
1 parent 42b3a97 commit 93b15e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export default auth(async (req) => {
}

// ⚙️ If Slug contains ``c``, redirect to /check/:slug:
if (slugRoute && slugRoute.endsWith("&c")) {
if (slugRoute?.endsWith("&c")) {
return Response.redirect(
new URL(`/check/${slugRoute.replace("&c", "")}`, nextUrl),
);
Expand Down

0 comments on commit 93b15e4

Please sign in to comment.