diff --git a/lib/core/mergeConfig.js b/lib/core/mergeConfig.js index bbbf96d4ff..e4600e5781 100644 --- a/lib/core/mergeConfig.js +++ b/lib/core/mergeConfig.js @@ -3,7 +3,7 @@ import utils from '../utils.js'; import AxiosHeaders from "./AxiosHeaders.js"; -const headersToObject = (thing) => thing instanceof AxiosHeaders ? thing.toJSON() : thing; +const headersToObject = (thing) => thing instanceof AxiosHeaders ? { ...thing } : thing; /** * Config-specific merge-function which creates a new config-object