Skip to content

Commit 6aa30b3

Browse files
committed
fix: trim slash for url path
1 parent 24633f5 commit 6aa30b3

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.changeset/purple-donkeys-bake.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"plantae": patch
3+
---
4+
5+
trim slash for url path

packages/plantae/src/axios/createAxiosInterceptors.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ function convertToAdapterRequest(
1717
): AdapterRequest {
1818
const path = req.url
1919
? req.url.startsWith("/")
20-
? req.url
21-
: `/${req.url}`
20+
? req.url.slice(1)
21+
: req.url
2222
: "";
2323

2424
const base = req.baseURL

0 commit comments

Comments
 (0)