Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unnecessary checks in default transformRequest #4202

Closed
wants to merge 1 commit into from

Commits on Oct 19, 2021

  1. Remove unnecessary checks in default transformRequest

    `transformRequest` callbacks can always expect their `headers`
    parameter to be defined. This is ensured immediately before the callback
    is made.
    See: https://github.com/axios/axios/blob/1025d1231a7747503188459dd5a6d1effdcea928/lib/core/dispatchRequest.js#L32-L40
    
    Accordingly, checking whether `headers` is `undefined` is unnecessary.
    
    This is related to axios#4201.
    brianhelba committed Oct 19, 2021
    Configuration menu
    Copy the full SHA
    164ef22 View commit details
    Browse the repository at this point in the history