mirror of
https://github.com/tenrok/axios.git
synced 2026-05-15 11:59:42 +03:00
Co-authored-by: Jay <jasonsaayman@gmail.com>
This commit is contained in:
@@ -31,11 +31,11 @@ export default function mergeConfig(config1, config2) {
|
||||
}
|
||||
|
||||
// eslint-disable-next-line consistent-return
|
||||
function mergeDeepProperties(a, b, prop , caseless) {
|
||||
function mergeDeepProperties(a, b, prop, caseless) {
|
||||
if (!utils.isUndefined(b)) {
|
||||
return getMergedValue(a, b, prop , caseless);
|
||||
return getMergedValue(a, b, prop, caseless);
|
||||
} else if (!utils.isUndefined(a)) {
|
||||
return getMergedValue(undefined, a, prop , caseless);
|
||||
return getMergedValue(undefined, a, prop, caseless);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -93,7 +93,7 @@ export default function mergeConfig(config1, config2) {
|
||||
socketPath: defaultToConfig2,
|
||||
responseEncoding: defaultToConfig2,
|
||||
validateStatus: mergeDirectKeys,
|
||||
headers: (a, b , prop) => mergeDeepProperties(headersToObject(a), headersToObject(b),prop, true)
|
||||
headers: (a, b, prop) => mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true)
|
||||
};
|
||||
|
||||
utils.forEach(Object.keys({...config1, ...config2}), function computeConfigValue(prop) {
|
||||
|
||||
Reference in New Issue
Block a user