Skip to content

Commit

Permalink
tslint updates
Browse files Browse the repository at this point in the history
  • Loading branch information
orizens committed Nov 27, 2017
1 parent 5a8182a commit b270bf2
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/modules/infinite-scroll.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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();
}
Expand Down

0 comments on commit b270bf2

Please sign in to comment.