diff --git a/js/views/listView.js b/js/views/listView.js index 8cd7d6bb83..e74a3423b5 100644 --- a/js/views/listView.js +++ b/js/views/listView.js @@ -271,7 +271,7 @@ ionic.extend(this, opts); if(!this.itemHeight && this.listEl) { - this.itemHeight = this.listEl.children[0] && parseInt(this.listEl.children[0].style.height); + this.itemHeight = this.listEl.children[0] && parseInt(this.listEl.children[0].style.height, 10); } ionic.views.ListView.__super__.initialize.call(this, opts); @@ -333,8 +333,8 @@ // Get the first and last elements in the list based on how many can fit // between the pixel range of lowWater and highWater - var first = parseInt(Math.abs(highWater / itemHeight)); - var last = parseInt(Math.abs(lowWater / itemHeight)); + var first = parseInt(Math.abs(highWater / itemHeight), 10); + var last = parseInt(Math.abs(lowWater / itemHeight), 10); // Get the items we need to remove this._virtualItemsToRemove = Array.prototype.slice.call(this.listEl.children, 0, first);