From b270bf2cb37129ac89c1f83e02f0da8c9f2bbdc1 Mon Sep 17 00:00:00 2001 From: Oren Farhi Date: Mon, 27 Nov 2017 17:43:53 +0200 Subject: [PATCH] tslint updates --- src/modules/infinite-scroll.directive.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/modules/infinite-scroll.directive.ts b/src/modules/infinite-scroll.directive.ts index 46b4469f..f2f3bacb 100644 --- a/src/modules/infinite-scroll.directive.ts +++ b/src/modules/infinite-scroll.directive.ts @@ -37,7 +37,7 @@ export class InfiniteScrollDirective private disposeScroller: Subscription; - constructor(private element: ElementRef, private zone: NgZone) {} + constructor(private element: ElementRef, private zone: NgZone) { } ngAfterViewInit() { if (!this.infiniteScrollDisabled) { @@ -50,11 +50,10 @@ export class InfiniteScrollDirective const disabledChanged = inputPropChanged(infiniteScrollDisabled); const distanceChanged = inputPropChanged(infiniteScrollDistance); const shouldSetup = (!disabledChanged && !this.infiniteScrollDisabled) || - (disabledChanged && !infiniteScrollDisabled.currentValue) || distanceChanged; - + (disabledChanged && !infiniteScrollDisabled.currentValue) || distanceChanged; + if (containerChanged || disabledChanged || distanceChanged) { this.destroyScroller(); - if (shouldSetup) { this.setup(); }