Skip to content

Commit

Permalink
Decode to encode (#402)
Browse files Browse the repository at this point in the history
  • Loading branch information
parulbaweja authored May 2, 2023
1 parent ab29303 commit 0a385a0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 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 @@
"eslint": "^7.24.0",
"jest": "^28.1.2",
"markdown-link-check": "^3.8.7",
"prettier": "^2.3.0",
"prettier": "^2.8.8",
"ts-jest": "^28.0.5",
"typescript": "^4.8.4"
}
Expand Down
4 changes: 3 additions & 1 deletion src/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,9 @@ export default class Client {
for (const [key, value] of Object.entries(query)) {
if (value !== undefined) {
if (Array.isArray(value)) {
value.forEach(val => url.searchParams.append(key, String(val)))
value.forEach(val =>
url.searchParams.append(key, decodeURIComponent(val))
)
} else {
url.searchParams.append(key, String(value))
}
Expand Down

0 comments on commit 0a385a0

Please sign in to comment.