Skip to content

Commit f023497

Browse files
authored
fix: buildURL type error (#101)
1 parent 0b64fd7 commit f023497

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
"@types/node": "^14.14.22",
5252
"@types/sinon": "^9.0.10",
5353
"ava": "^3.15.0",
54-
"axios": "^0.21.1",
54+
"axios": ">=0.21.1",
5555
"codecov": "^3.8.1",
5656
"husky": "^4.3.8",
5757
"np": "^7.2.0",

src/throttleAdapterEnhancer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export default function throttleAdapterEnhancer(adapter: AxiosAdapter, options:
2828
const responsePromise = (async () => {
2929

3030
try {
31-
31+
// @ts-ignore
3232
const response = await adapter(config);
3333

3434
cache.set(index, {

src/utils/buildSortedURL.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,11 @@
44
* @since 2017-10-12
55
*/
66

7-
// @ts-ignore
8-
import buildURL from 'axios/lib/helpers/buildURL';
7+
import axios from 'axios';
98

109
export default function buildSortedURL(...args: any[]) {
11-
12-
const builtURL = buildURL(...args);
10+
const [url, params, paramsSerializer] = args;
11+
const builtURL = axios.getUri({ url, params, paramsSerializer });
1312

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

0 commit comments

Comments
 (0)