Undo validHeaders map

This commit is contained in:
yaoweiprc
2026-04-21 16:29:53 +08:00
parent d8f04d3028
commit d7b173697d

View File

@@ -102,15 +102,7 @@ export const mockRouteToHar = ({
headersArray: RequestHeader[];
body: string;
}): Har.Response => {
const validHeaders = headersArray
.filter(({ name }) => !!name)
.map(h => ({
id: h.id || '',
name: h.name,
value: h.value,
description: h.description || '',
disabled: h.disabled ?? false,
}));
const validHeaders = headersArray.filter(({ name }) => !!name);
return {
status: +statusCode,
statusText: statusText || RESPONSE_CODE_REASONS[+statusCode] || '',