Skip to content

Commit

Permalink
fix(dhl): ignore undefined attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerald Baulig committed Nov 4, 2024
1 parent ef9b8d3 commit fda51fc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/stubs/dhl_soap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -442,15 +442,15 @@ export class DHLSoap extends Stub {
protected parseService (attributes: Attribute[]) {
return attributes?.reverse().filter((att: Attribute) =>
att.id?.startsWith(this.urns.dhl_service)
).map((att: any) => ({
).map(att=> ({
[att.value]: {
attributes: Object.assign(
{
active: "1",
},
...att.attribute.map(
(att: any) => ({[att.id]: att.value})
)
...(att.attributes?.map(
att=> ({[att.id]: att.value})
) ?? [])
)
}
}));
Expand Down

0 comments on commit fda51fc

Please sign in to comment.