Skip to content

Commit

Permalink
Fix typo in warning logic
Browse files Browse the repository at this point in the history
  • Loading branch information
textbook committed Feb 5, 2025
1 parent 29d546f commit 075db44
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion api/utils/middleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const asyncHandler = (handler) => {
await handler(req, res, () => {
logger.warn("async handlers should not call next");
});
if (!req.headersSent) {
if (!res.headersSent) {
logger.warn("async handlers should send responses");
}
next();
Expand Down

0 comments on commit 075db44

Please sign in to comment.