Skip to content
This repository has been archived by the owner on Jul 28, 2024. It is now read-only.

Commit

Permalink
Update src/server/authMiddleware.ts
Browse files Browse the repository at this point in the history
Co-authored-by: Asaf Shen <[email protected]>
  • Loading branch information
gaokevin1 and asafshen authored Jul 24, 2024
1 parent 3153db1 commit 21c2a2d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/server/authMiddleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ const createAuthMiddleware =
async (req: NextRequest) => {
console.debug('Auth middleware starts');

if (options.publicRoutes && options.privateRoutes) {
if (options.publicRoutes?.length > 0 && options.privateRoutes?.length > 0) {
console.warn(
'Both publicRoutes and privateRoutes are defined. Ignoring privateRoutes.'
);
Expand Down

0 comments on commit 21c2a2d

Please sign in to comment.