fix: Make sure if header is set already, it isn't set again (#12194)
This commit is contained in:
parent
9348279818
commit
d8356e9a5b
|
@ -13,7 +13,9 @@ export function defaultResponder<T>(f: Handle<T>) {
|
|||
performance.mark("Start");
|
||||
const result = await f(req, res);
|
||||
ok = true;
|
||||
if (result) res.json(result);
|
||||
if (result && !res.writableEnded) {
|
||||
res.json(result);
|
||||
}
|
||||
} catch (err) {
|
||||
console.error(err);
|
||||
const error = getServerErrorFromUnknown(err);
|
||||
|
|
Loading…
Reference in New Issue
Block a user