Skip to content

Commit

Permalink
fix: buildURL type error (#101)
Browse files Browse the repository at this point in the history
  • Loading branch information
mengqiuleo committed May 29, 2023
1 parent 0b64fd7 commit f023497
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"@types/node": "^14.14.22",
"@types/sinon": "^9.0.10",
"ava": "^3.15.0",
"axios": "^0.21.1",
"axios": ">=0.21.1",
"codecov": "^3.8.1",
"husky": "^4.3.8",
"np": "^7.2.0",
Expand Down
2 changes: 1 addition & 1 deletion src/throttleAdapterEnhancer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export default function throttleAdapterEnhancer(adapter: AxiosAdapter, options:
const responsePromise = (async () => {

try {

// @ts-ignore
const response = await adapter(config);

cache.set(index, {
Expand Down
7 changes: 3 additions & 4 deletions src/utils/buildSortedURL.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@
* @since 2017-10-12
*/

// @ts-ignore
import buildURL from 'axios/lib/helpers/buildURL';
import axios from 'axios';

export default function buildSortedURL(...args: any[]) {

const builtURL = buildURL(...args);
const [url, params, paramsSerializer] = args;
const builtURL = axios.getUri({ url, params, paramsSerializer });

const [urlPath, queryString] = builtURL.split('?');

Expand Down

0 comments on commit f023497

Please sign in to comment.