From 69ef5ffc491c547ffc49d7d29d9b9393e01bb06f Mon Sep 17 00:00:00 2001 From: Erjan Gavalji Date: Thu, 4 Feb 2016 15:58:38 +0200 Subject: [PATCH] Apply the fix, suggested by Github userx4080, issue 1371 --- ui/list-view/list-view.android.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/ui/list-view/list-view.android.ts b/ui/list-view/list-view.android.ts index d5ab324bc..9e1af72bc 100644 --- a/ui/list-view/list-view.android.ts +++ b/ui/list-view/list-view.android.ts @@ -151,17 +151,17 @@ export class ListView extends common.ListView { var length = keys.length; var view: viewModule.View; var key; - for (i = 0; i < length; i++) { key = keys[i]; view = this._realizedItems[key]; - - this.notify({ - eventName: ITEMLOADING, - object: this, - index: view[REALIZED_INDEX], - view: view - }); + if (view[REALIZED_INDEX] < this.items.length) { + this.notify({ + eventName: ITEMLOADING, + object: this, + index: view[REALIZED_INDEX], + view: view + }); + } } } } @@ -251,4 +251,4 @@ function ensureListViewAdapterClass() { } ListViewAdapterClass = ListViewAdapter; -} \ No newline at end of file +}