Skip to content

Commit

Permalink
Simplify changes calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
masimplo committed Sep 15, 2017
1 parent ad9c6d9 commit a716e58
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/components/virtual-scroll/virtual-scroll.ts
Expand Up @@ -445,7 +445,7 @@ export class VirtualScroll implements DoCheck, AfterContentInit, OnDestroy {
}

// and if there actually are changes
const changes = this._changes();
const changes = isPresent(this._differ) ? this._differ.diff(this.virtualScroll) : null;
if (!isPresent(changes)) {
return;
}
Expand Down Expand Up @@ -527,13 +527,6 @@ export class VirtualScroll implements DoCheck, AfterContentInit, OnDestroy {
this.bufferRatio);
}

private _changes(): IterableChanges<any> {
if (isPresent(this._records) && isPresent(this._differ)) {
return this._differ.diff(this._records);
}
return null;
}

/**
* @hidden
* DOM WRITE
Expand Down

0 comments on commit a716e58

Please sign in to comment.