Skip to content

Commit

Permalink
Merge pull request #22 from valeriykundas/patch-1
Browse files Browse the repository at this point in the history
Fix `parseParams`
  • Loading branch information
valeriikundas authored Jan 18, 2021
2 parents e6af25f + 7b563e8 commit 586d91a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/apiClient/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const parseParams = (params: object) => {

keys.forEach(key => {
const isParamTypeObject = typeof params[key] === 'object'
const isParamTypeArray = isParamTypeObject && params[key].length >= 0
const isParamTypeArray = isParamTypeObject && params[key] && params[key].length >= 0

if (!isParamTypeObject) {
options += `${key}=${params[key]}&`
Expand Down

0 comments on commit 586d91a

Please sign in to comment.