Skip to content

Commit

Permalink
Update src/helpers/with-middleware-auth-required.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
adamjmcgrath authored Aug 3, 2023
1 parent 688a16e commit 1f23495
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/helpers/with-middleware-auth-required.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export default function withMiddlewareAuthRequiredFactory(
let middleware: NextMiddleware | undefined;
const { pathname, origin, search } = req.nextUrl;
let returnTo = `${pathname}${search}`;
if (opts && typeof opts === 'function') {
if (typeof opts === 'function') {
middleware = opts;
} else if (opts) {
middleware = opts.middleware;
Expand Down

0 comments on commit 1f23495

Please sign in to comment.