Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: arguments merge function #360

Merged
merged 2 commits into from
Dec 15, 2022
Merged

fix: arguments merge function #360

merged 2 commits into from
Dec 15, 2022

Conversation

fpdrozd
Copy link
Contributor

@fpdrozd fpdrozd commented Dec 13, 2022

This PR fixes the filter of empty objects and adds a filter for objects with falsy props to the squashAndPreparePositionalArguments function. The lack of them caused an error when calling the account.completedOrder endpoint. When provided with the following array:

[
  { order_number: undefined },
  {
    bearer_token: '...',
    order_number: 'R285427148',
    include: '...'
  },
  {}
]

The merge function would overwrite order_number to undefined instead of assigning the valid R285427148.

This might have possibly caused similar errors in other endpoints that use the new SDK's options interface.

@rafalcymerys rafalcymerys merged commit b421ab4 into main Dec 15, 2022
@delete-merged-branch delete-merged-branch bot deleted the fix/arguments-merge branch December 15, 2022 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants