Skip to content

Commit c65ed35

Browse files
committed
fix: prevent override of default value of request.postData when postData might be undefined
1 parent a0c0933 commit c65ed35

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/httpsnippet.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,10 @@ export class HTTPSnippet {
100100
cookies: [],
101101
httpVersion: 'HTTP/1.1',
102102
queryString: [],
103-
postData: {
103+
...request,
104+
postData: request?.postData || {
104105
mimeType: request.postData?.mimeType || 'application/octet-stream',
105106
},
106-
...request,
107107
};
108108

109109
if (validateHarRequest(req)) {

0 commit comments

Comments
 (0)