Skip to content

Commit e1e5814

Browse files
committed
fix: make next required to avoid missing coverage
1 parent 98a7e55 commit e1e5814

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export const jwt = ({
3333
responseHeaderName = 'X-Token',
3434
getToken = getTokenFromHeader
3535
}: JwtMwProps) => {
36-
return function (req: RequestWithUser, res: ServerResponse, next?: () => void) {
36+
return function (req: RequestWithUser, res: ServerResponse, next: () => void) {
3737
const token: string = getToken((req.headers[requestHeaderName] as string) ?? '')
3838

3939
try {
@@ -56,9 +56,9 @@ export const jwt = ({
5656
algorithm
5757
})
5858
)
59-
next?.()
59+
next()
6060
} catch {
61-
next?.()
61+
next()
6262
}
6363
}
6464
}

0 commit comments

Comments
 (0)