Skip to content

Commit

Permalink
demo app fix (2)
Browse files Browse the repository at this point in the history
  • Loading branch information
dhilt committed Aug 8, 2018
1 parent 912a323 commit 663f4eb
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions demo/app/samples/test.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,10 @@ export class TestComponent {

getVisibleItemsCount(): number {
const adapter = this.datasource.adapter;
const last = (adapter.lastVisible && adapter.lastVisible.$index) || NaN;
const first = (adapter.firstVisible && adapter.firstVisible.$index) || NaN;
let last = <number>adapter.lastVisible.$index;
last = Number.isInteger(last) ? last : NaN;
let first = <number>adapter.firstVisible.$index;
first = Number.isInteger(first) ? first : NaN;
return (Number.isNaN(last) || Number.isNaN(first)) ? 0 : last - first + 1;
}

Expand Down

0 comments on commit 663f4eb

Please sign in to comment.