diff --git a/stirling-pdf/src/main/resources/templates/fragments/common.html b/stirling-pdf/src/main/resources/templates/fragments/common.html index 7802c475f..1bda883d2 100644 --- a/stirling-pdf/src/main/resources/templates/fragments/common.html +++ b/stirling-pdf/src/main/resources/templates/fragments/common.html @@ -92,7 +92,7 @@ // Check if this is a right-aligned dropdown (language, favorites, search, etc.) const isRightAligned = navbar && navbar.classList.contains('flex-nowrap') && - !parentItem.closest('.dropdown-mega'); + !parentItem?.closest('.dropdown-mega'); dropdown.style.transformOrigin = isRightAligned ? 'top right' : 'top left'; });