Skip to content

Commit

Permalink
fix(scroll-handler): only update scroll handler length when elements …
Browse files Browse the repository at this point in the history
…array changes
  • Loading branch information
adamjmcgrath committed Aug 9, 2016
1 parent 49d3694 commit bf1c02b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions addon/-private/radar/utils/scroll-handler.js
Expand Up @@ -13,9 +13,9 @@ export class ScrollHandler {
}

addElementHandler(element, handler) {
let index = this.length++;

if (this.elements.indexOf(element) === -1) {
let index = this.length++;

if (index === this.maxLength) {
this.maxLength *= 2;
this.elements.length = this.maxLength;
Expand Down

0 comments on commit bf1c02b

Please sign in to comment.