Skip to content

Conversation

@nsrCodes
Copy link
Contributor

since har entry is of type [src]

interface Entry {
  request: Partial<HarRequest>;
}

so request.postData could have the value undefined

The current approach of setting the default value for this key will fail when postData is undefined

This then breaks the switch case inside the prepare method because there is no optional chaining

This PR is broken into two commits. If only either one feels sufficient, the changes can be cherry-picked or both can be squashed.

@nsrCodes nsrCodes force-pushed the fix-postdata-default-type branch from 2535062 to d5e88ab Compare July 19, 2023 06:37
@CLAassistant
Copy link

CLAassistant commented Jun 27, 2024

CLA assistant check
All committers have signed the CLA.

@filfreire filfreire force-pushed the fix-postdata-default-type branch from d5e88ab to d888e39 Compare July 12, 2024 17:39
@filfreire filfreire merged commit e99422a into Kong:master Jul 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants