diff --git a/src/solid/swiper.js b/src/solid/swiper.js index e2000201c..0e0bc7171 100644 --- a/src/solid/swiper.js +++ b/src/solid/swiper.js @@ -191,11 +191,7 @@ const Swiper = (props) => { return renderVirtual(swiperRef, slides, virtualData()); } if (!params().params.loop || (swiperRef && swiperRef.destroyed)) { - return slides.map((child) => { - const node = child.cloneNode(true); - node.swiper = swiperRef; - return node; - }); + return slides; } return renderLoop(swiperRef, slides, params().params); } diff --git a/src/solid/virtual.js b/src/solid/virtual.js index ed0c1848b..2f4856fcd 100644 --- a/src/solid/virtual.js +++ b/src/solid/virtual.js @@ -10,10 +10,8 @@ function renderVirtual(swiper, slides, virtualData) { return slides .filter((child, index) => index >= virtualData.from && index <= virtualData.to) .map((child) => { - const node = child.cloneNode(true); - node.swiper = swiper; - Object.assign(node.style, style); - return node; + Object.assign(child.style, style); + return child; }); }