From 9a324f4dea21ece0ae56dda38270f293a21f83c2 Mon Sep 17 00:00:00 2001 From: Andrew Lo Date: Thu, 23 Jun 2016 09:24:46 -0400 Subject: [PATCH] When the slide container does not have page indicators, changed events do not fire while swiping through the slides. This is because this._footer is referenced by setActivePageIndicator, which is undefined in the case where we have no page indicators. Fix is to only call setActivePageIndicator when we have page indicators enabled. --- nativescript-slides.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nativescript-slides.ts b/nativescript-slides.ts index 906ab8f..66abd22 100755 --- a/nativescript-slides.ts +++ b/nativescript-slides.ts @@ -374,7 +374,9 @@ export class SlideContainer extends AbsoluteLayout { if (this.disablePan === false) { this.applySwipe(this.pageWidth); } - this.setActivePageIndicator(this.currentPanel.index); + if (this.pageIndicators) { + this.setActivePageIndicator(this.currentPanel.index); + } this.rebindSlideShow(); }