Fix canvas host header test type

This commit is contained in:
Gustavo Madeira Santana
2026-04-17 14:33:08 -04:00
parent 462074c4c2
commit ee0c8177bf

View File

@@ -76,7 +76,9 @@ async function captureHandlerResponse(
const res = {
statusCode: 200,
setHeader(name: string, value: number | string | readonly string[]) {
response.headers[name.toLowerCase()] = Array.isArray(value) ? [...value] : value;
const headerValue: number | string | string[] =
typeof value === "object" ? [...value] : value;
response.headers[name.toLowerCase()] = headerValue;
return this;
},
end(chunk?: string | Buffer) {