Fix #660: don't send headers twice on emoji router errors.

This commit is contained in:
John Livingston 2025-05-12 11:16:29 +02:00
parent 7fd895c82e
commit 35236328b2
No known key found for this signature in database
GPG Key ID: B17B5640CE66CDBC
2 changed files with 9 additions and 1 deletions

View File

@ -1,5 +1,11 @@
# Changelog
## (???) Not Released Yet
### Minor changes and fixes
* Fix #660: don't send headers twice on emoji router errors.
## 12.0.3
### Minor changes and fixes

View File

@ -78,7 +78,9 @@ export async function initEmojisRouter (
},
(err) => {
if (err) {
res.sendStatus(404)
if (!res.headersSent) {
res.sendStatus(404)
}
}
}
)