Skip to content

Commit

Permalink
changed order to wrapInnerinP so it happens before decorateButtons
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanmparrish committed Aug 12, 2024
1 parent c5e717f commit c6d9cc5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libs/blocks/hero-marquee/hero-marquee.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ function wrapInnerHTMLInPTag(el) {

function decorateText(el, classes) {
el.classList.add('norm');
wrapInnerHTMLInPTag(el);
const btnClass = classes?.find((c) => c.endsWith('-button'));
if (btnClass) {
const [theme, size] = btnClass.split('-').reverse();
Expand All @@ -101,7 +102,6 @@ function decorateText(el, classes) {
} else {
decorateButtons(el, 'button-xl');
}
wrapInnerHTMLInPTag(el);
decorateBlockText(el, textDefault);
decorateTextOverrides(el, ['-heading', '-body', '-detail']);
}
Expand Down

0 comments on commit c6d9cc5

Please sign in to comment.