Skip to content

Commit

Permalink
VAT-1: exception added for logotypes. they should not be transformed …
Browse files Browse the repository at this point in the history
…into buttons.
  • Loading branch information
dragandimic committed Jun 7, 2024
1 parent 1e116d8 commit 88f2738
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/aem.js
Original file line number Diff line number Diff line change
Expand Up @@ -424,8 +424,9 @@ function decorateButtons(element) {
if (a.href !== a.textContent) {
const up = a.parentElement;
const twoup = a.parentElement.parentElement;
const parentIsLogo = a.closest('logo.block');
if (!a.querySelector('img')) {
if (up.childNodes.length === 1 && (up.tagName === 'P' || up.tagName === 'DIV')) {
if (up.childNodes.length === 1 && (up.tagName === 'P' || up.tagName === 'DIV') && !parentIsLogo) {
a.className = 'button'; // default
up.classList.add('button-container');
}
Expand Down

0 comments on commit 88f2738

Please sign in to comment.