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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(client): Do not override client params #2494

Conversation

rozzilla
Copy link
Contributor

@rozzilla rozzilla commented May 2, 2024

This fixes subtle bugs, since right now the client (when called), overrides the parameters passed.

As an example:

const params = {
    path: { id: 'baz' },
    query: { name: 'bar' }
  })
}
const result = await client.getPath(params)
// 馃 `params` is now { path: { id: undefined }, query: { name: undefined } } 馃

Signed-off-by: Roberto Bianchi <roberto.bianchi@spendesk.com>
Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mcollina mcollina merged commit 3dc2a05 into platformatic:main May 2, 2024
86 of 87 checks passed
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