Skip to content

Commit

Permalink
refactor (PR review)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamviktora committed Sep 25, 2024
1 parent 933e273 commit 92e0d86
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -234,14 +234,16 @@ module.exports = {
titleTextAttribute
);

const titleText =
titleTextPropValue ||
(hasChildren
const createTitleTextPropFromChildren = () =>
hasChildren
? `titleText=${getChildrenAsAttributeValueText(
context,
header.children
)}`
: "");
: "";

const titleText =
titleTextPropValue || createTitleTextPropFromChildren();

const iconPropValue = getExpression(headerIconAttribute?.value);

Expand Down

0 comments on commit 92e0d86

Please sign in to comment.