Skip to content

Commit

Permalink
refactor: remove not needed copy to $attributes, add check if base is…
Browse files Browse the repository at this point in the history
… typeof string and align var/const names with codebase
  • Loading branch information
TheDadi committed Sep 2, 2024
1 parent 95adb37 commit 85f416c
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/wsdl/elements.ts
Original file line number Diff line number Diff line change
Expand Up @@ -420,11 +420,8 @@ export class RestrictionElement extends Element {
return typeElement.description(definitions, schema.xmlns);
};
if (typeElement) {
const baseDescription = typeElement.description(definitions, schema.xmlns);
if (baseDescription[AttributeElement.Symbol]) {
_.defaults($attributes, baseDescription[AttributeElement.Symbol]);
}
desc = _.defaults(desc, baseDescription);
const base = typeElement.description(definitions, schema.xmlns);
desc = typeof base === 'string' ? base : _.defaults(base, desc);
}
return desc;
}
Expand Down

0 comments on commit 85f416c

Please sign in to comment.