Skip to content

Commit 8a4a93e

Browse files
ataraxusbrandyscarney
authored andcommitted
refactor(swiper): add null check for better testability (#11191)
1 parent bb22e4a commit 8a4a93e

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/components/slides/swiper/swiper.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -897,9 +897,10 @@ function cleanupStyles(s: Slides) {
897897
}
898898

899899
// Container
900-
removeClass(s.container, s._classNames);
901-
s.container.removeAttribute('style');
902-
900+
if(s.container){
901+
removeClass(s.container, s._classNames);
902+
s.container.removeAttribute('style');
903+
}
903904
// Wrapper
904905
s._wrapper.removeAttribute('style');
905906

0 commit comments

Comments
 (0)