Skip to content

Commit

Permalink
fix(slidebox): prevent read only property error on assigning of length.
Browse files Browse the repository at this point in the history
Closes #3589
  • Loading branch information
perrygovier committed Apr 27, 2015
1 parent c64e0ba commit 08956b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/views/sliderView.js
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ ionic.views.Slider = ionic.views.View.inherit({
element.style.left = '';

// reset slides so no refs are held on to
slides && (slides.length = 0);
slides && (slides.length = []);

This comment has been minimized.

Copy link
@fredgalvao

fredgalvao Apr 27, 2015

Shouldn't this be slides && (slides = []); instead? Assigning a nonInteger to an array's length seems like a very odd and breaking way to reset the array itself (prob just a typo or I haven't read enough wtfjs).

This comment has been minimized.

Copy link
@perrygovier

perrygovier May 7, 2015

Author Contributor

doh!


// removed event listeners
if (browser.addEventListener) {
Expand Down

0 comments on commit 08956b2

Please sign in to comment.