Skip to content

Params Merge Bug #6667

@suli-1997

Description

@suli-1997

Describe the bug

For axios >= 1.2.0. When default params is set. The params merging process is wrong.

To Reproduce

https://codepen.io/lililisu1997/pen/gOVXaqX?editors=1111

Code snippet

// try comment the following line and run again
axios.defaults.params = {};

const s = axios.getUri({
  url: '/tiktok',
  params: {
    region: 'BR',
    Region: 'BR',
  },
})
console.log(s);

Expected behavior

The output should be the same whether the default params is set or not

Axios Version

1.7.7

Adapter Version

No response

Browser

No response

Browser Version

No response

Node.js Version

No response

OS

No response

Additional Library Versions

No response

Additional context/Screenshots

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions