mirror of
https://github.com/tenrok/axios.git
synced 2026-06-14 18:42:33 +03:00
chore: remove unnecessary eslint-disable directive (#7283)
Co-authored-by: Jay <jasonsaayman@gmail.com>
This commit is contained in:
@@ -21,7 +21,7 @@ export default function mergeConfig(config1, config2) {
|
||||
|
||||
function getMergedValue(target, source, prop, caseless) {
|
||||
if (utils.isPlainObject(target) && utils.isPlainObject(source)) {
|
||||
return utils.merge.call({caseless}, target, source);
|
||||
return utils.merge.call({ caseless }, target, source);
|
||||
} else if (utils.isPlainObject(source)) {
|
||||
return utils.merge({}, source);
|
||||
} else if (utils.isArray(source)) {
|
||||
@@ -30,7 +30,6 @@ export default function mergeConfig(config1, config2) {
|
||||
return source;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line consistent-return
|
||||
function mergeDeepProperties(a, b, prop, caseless) {
|
||||
if (!utils.isUndefined(b)) {
|
||||
return getMergedValue(a, b, prop, caseless);
|
||||
@@ -96,7 +95,7 @@ export default function mergeConfig(config1, config2) {
|
||||
headers: (a, b, prop) => mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true)
|
||||
};
|
||||
|
||||
utils.forEach(Object.keys({...config1, ...config2}), function computeConfigValue(prop) {
|
||||
utils.forEach(Object.keys({ ...config1, ...config2 }), function computeConfigValue(prop) {
|
||||
const merge = mergeMap[prop] || mergeDeepProperties;
|
||||
const configValue = merge(config1[prop], config2[prop], prop);
|
||||
(utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
|
||||
|
||||
Reference in New Issue
Block a user