Skip to content

Commit

Permalink
fix: do not redecorate initialised blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
buuhuu authored Feb 27, 2024
1 parent 1c459aa commit 3f93f7d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/aem.js
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ async function loadBlocks(main) {
*/
function decorateBlock(block) {
const shortBlockName = block.classList[0];
if (shortBlockName) {
if (shortBlockName && !block.dataset.blockStatus) {
block.classList.add('block');
block.dataset.blockName = shortBlockName;
block.dataset.blockStatus = 'initialized';
Expand Down

0 comments on commit 3f93f7d

Please sign in to comment.