Skip to content

Commit

Permalink
remove extra Boolean comment
Browse files Browse the repository at this point in the history
  • Loading branch information
technophile-04 committed Feb 28, 2024
1 parent f7b1e9b commit 8386213
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/nextjs/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export function middleware(request: NextRequest) {
const { pathname } = request.nextUrl;

// Extract the first path segment after the initial slash, if any.
const pathSegments = pathname.split("/").filter(Boolean); // Removes empty strings from the result.
const pathSegments = pathname.split("/").filter(Boolean);

// Check if there is exactly one path segment and if it matches the address regex.
if (pathSegments.length === 1 && addressRegex.test(pathSegments[0])) {
Expand Down

0 comments on commit 8386213

Please sign in to comment.