Skip to content

Commit

Permalink
fix(rTorrent): prevent extra commas in serialized XML (#830)
Browse files Browse the repository at this point in the history
  • Loading branch information
kannibalox authored Dec 7, 2024
1 parent 80825db commit 433ec24
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions server/services/rTorrent/util/XMLRPCSerializer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const value = (value: XMLRPCValue): string => {
};

const data = (values: XMLRPCValue[]) => {
return `<data>${values.map(value)}</data>`;
return `<data>${values.map(value).join('')}</data>`;
};

const member = ([key, val]: [string, XMLRPCValue]) => {
Expand All @@ -64,7 +64,7 @@ const param = (param: XMLRPCValue) => {
const sParams = (params: XMLRPCValue[]) => {
if (!params?.length) return '';

return `<params>${params.map(param)}</params>`;
return `<params>${params.map(param).join('')}</params>`;
};

const serializeSync = (methodName: string, params: XMLRPCValue[]): string => {
Expand Down

0 comments on commit 433ec24

Please sign in to comment.