Skip to content

Commit

Permalink
fix: correclty reduce arguments (#51)
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickmichalina authored Sep 30, 2021
1 parent 87fee1e commit 885610e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/soap/request.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export interface IXmlContainer {
export const generateRequestElements = (reqNode: string) => (params: any) => {
const cleanedParams = Object
.keys(params)
.reduce((acc, curr) => params[curr] === undefined ? acc : { ...acc, ...params[curr] }, {})
.reduce((acc, curr) => params[curr] === undefined ? acc : { ...acc, [curr]: params[curr] }, {})

return js2xml({ [reqNode.replace(':', '_')]: cleanedParams }, {
compact: true,
Expand Down

0 comments on commit 885610e

Please sign in to comment.