Skip to content

Commit

Permalink
return a named function
Browse files Browse the repository at this point in the history
  • Loading branch information
watany-dev committed May 7, 2024
1 parent 2994a4a commit 758a334
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/middleware/timeout/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const timeout = (
const errorMessage = options.message ?? DEFAULT_ERROR_MESSAGE
const errorCode = options.code ?? DEFAULT_ERROR_CODE

return async (context, next) => {
return async function timeout(context, next) {
let timer: number | undefined

const timeoutPromise = new Promise<void>((_, reject) => {
Expand Down

0 comments on commit 758a334

Please sign in to comment.