diff --git a/core/src/components/slides/slides.tsx b/core/src/components/slides/slides.tsx index 4159adfd19..d162c4371a 100644 --- a/core/src/components/slides/slides.tsx +++ b/core/src/components/slides/slides.tsx @@ -132,16 +132,19 @@ export class Slides implements ComponentInterface { @Event() ionSlideTouchEnd!: EventEmitter; connectedCallback() { - const mut = this.mutationO = new MutationObserver(() => { - if (this.swiperReady) { - this.update(); - } - }); - mut.observe(this.el, { - childList: true, - subtree: true - }); - this.el.componentOnReady().then(() => this.initSwiper()); + // tslint:disable-next-line: strict-type-predicates + if (typeof MutationObserver !== 'undefined') { + const mut = this.mutationO = new MutationObserver(() => { + if (this.swiperReady) { + this.update(); + } + }); + mut.observe(this.el, { + childList: true, + subtree: true + }); + this.el.componentOnReady().then(() => this.initSwiper()); + } } async disconnectedCallback() {