We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0b2b7ed commit d81da3dCopy full SHA for d81da3d
src/dynamic-handle.ts
@@ -581,8 +581,10 @@ export const createDynamicHandler = (app: AnyElysia) => {
581
return app.handleError(context, reportedError)
582
} finally {
583
if (app.event.afterResponse)
584
- for (const afterResponse of app.event.afterResponse)
585
- await afterResponse.fn(context as any)
+ setImmediate(async () => {
+ for (const afterResponse of app.event.afterResponse!)
586
+ await afterResponse.fn(context as any)
587
+ })
588
}
589
590
0 commit comments