Skip to content

Commit

Permalink
feat: improve performance measuring
Browse files Browse the repository at this point in the history
  • Loading branch information
vtsaplin committed Dec 18, 2023
1 parent dbca8e7 commit f8b3ddf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion solutions/scripts/aem-perf-marks.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const observer = new MutationObserver((mutations) => {
const { target } = mutation;
// console.debug('MutationObserver', target); // eslint-disable-line no-console
if (target.dataset.sectionStatus || target.dataset.blockStatus) {
const markName = target.classList.join('_');
const markName = target.classList ? target.classList.join('_') : target.id;
const status = target.dataset.sectionStatus || target.dataset.blockStatus;
if (status === 'initialized') {
window.PerfMarks.create(markName, { section: target.id });
Expand Down

0 comments on commit f8b3ddf

Please sign in to comment.