Skip to content

Commit 9035efa

Browse files
committed
Paper over a bug in fastify
1 parent b1814bf commit 9035efa

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "strontium",
3-
"version": "2.4.4",
3+
"version": "2.4.5",
44
"description": "Strontium is a TypeScript toolkit for High Performance API servers built for Production not Projects.",
55
"main": "lib/src/index.js",
66
"types": "lib/src/index.d.ts",

src/http/drivers/FastifyServer.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,12 @@ export class FastifyServer implements Process {
209209
rawResponse
210210
)
211211

212+
// Handle an edge case in Fastify that doesn't allow async/await undefined returns
213+
if (validatedOutput === undefined) {
214+
return response.send()
215+
}
216+
217+
212218
return validatedOutput
213219
} catch (e) {
214220
// Handle errors in the output validation.

0 commit comments

Comments
 (0)