diff --git a/src/swiper-element.mjs b/src/swiper-element.mjs index 27eb0ff4d..5d6dc3c35 100644 --- a/src/swiper-element.mjs +++ b/src/swiper-element.mjs @@ -13,7 +13,7 @@ import { updateSwiper } from './components-shared/update-swiper.mjs'; //SWIPER_STYLES //SWIPER_SLIDE_STYLES -class DummyHTMLElement { } +class DummyHTMLElement {} const ClassToExtend = typeof window === 'undefined' || typeof HTMLElement === 'undefined' @@ -24,7 +24,7 @@ const arrowSvg = ` { - if (typeof CSSStyleSheet !== 'undefined' && !shadowRoot.adoptedStyleSheets) { + if (typeof CSSStyleSheet !== 'undefined' && shadowRoot.adoptedStyleSheets) { const styleSheet = new CSSStyleSheet(); styleSheet.replaceSync(styles); shadowRoot.adoptedStyleSheets = [styleSheet]; @@ -32,9 +32,9 @@ const addStyle = (shadowRoot, styles) => { const style = document.createElement('style'); style.rel = 'stylesheet'; style.textContent = styles; - shadowRoot.appendChild(style) + shadowRoot.appendChild(style); } -} +}; class SwiperContainer extends ClassToExtend { constructor() { @@ -176,19 +176,19 @@ class SwiperContainer extends ClassToExtend { changedParams: [attrToProp(propName)], ...(propName === 'navigation' && passedParams[propName] ? { - prevEl: '.swiper-button-prev', - nextEl: '.swiper-button-next', - } + prevEl: '.swiper-button-prev', + nextEl: '.swiper-button-next', + } : {}), ...(propName === 'pagination' && passedParams[propName] ? { - paginationEl: '.swiper-pagination', - } + paginationEl: '.swiper-pagination', + } : {}), ...(propName === 'scrollbar' && passedParams[propName] ? { - scrollbarEl: '.swiper-scrollbar', - } + scrollbarEl: '.swiper-scrollbar', + } : {}), }); }