diff --git a/js/views-bootstrap.js b/js/views-bootstrap.js index a2143b1ee279977798f003becf5f5d58156b318b..06f2702b4bff94b6fe024e17c8359b55c1b03be8 100644 --- a/js/views-bootstrap.js +++ b/js/views-bootstrap.js @@ -1,23 +1,21 @@ (function () { - - 'use strict'; - /** * Attaches the behavior to bootstrap carousel view. */ Drupal.behaviors.views_bootstrap_carousel = { - attach: function (context, settings) { + attach(context, settings) { const carousels = document.querySelectorAll('.carousel-inner'); carousels.forEach(function (carousel) { const children = carousel.querySelectorAll('div'); if (children.length === 1) { - const siblings = carousel.parentElement.querySelectorAll('.carousel-control, .carousel-indicators'); + const siblings = carousel.parentElement.querySelectorAll( + '.carousel-control, .carousel-indicators', + ); siblings.forEach(function (sibling) { sibling.style.display = 'none'; }); } }); - } + }, }; - -}()); +})();