(function($) {
$(window).on('elementor/frontend/init', function() {
if ($('.elementor-widget-n-accordion').length) {
return;
}
const accordionTitles = $('.e-n-accordion-item-title-text');
accordionTitles.each(function() {
if (!$(this).text().trim().length) {
$(this).parents('details').remove();
}
});
});
})(jQuery);