From a7b1a5be1d7a7f946c1a5c24f99a6328a3b1749e Mon Sep 17 00:00:00 2001 From: Alexis Coelho Date: Thu, 21 Mar 2024 11:05:33 +0100 Subject: [PATCH] NA - Add safe guard --- scripts/aem.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/aem.js b/scripts/aem.js index 4e0e4ca..7129733 100644 --- a/scripts/aem.js +++ b/scripts/aem.js @@ -746,7 +746,9 @@ function decorateGroups() { if (isConfigurationResultPage) { const lastGroup = groupContainer.querySelector('div :nth-last-child(1 of .block)'); - lastGroup.classList.add('last'); + if (lastGroup) { + lastGroup.classList.add('last'); + } } parentElement.appendChild(groupContainer);