Skip to content

Commit

Permalink
Merge pull request #818 from mjonas87/master
Browse files Browse the repository at this point in the history
Improved infinite loop avoidance in autoSizeColumns()
  • Loading branch information
mleibman committed Dec 3, 2013
2 parents 97321dd + e6e2f88 commit e0fa6a8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions slick.grid.js
Original file line number Diff line number Diff line change
Expand Up @@ -1061,7 +1061,7 @@ if (typeof Slick === "undefined") {
shrinkLeeway -= shrinkSize;
widths[i] -= shrinkSize;
}
if (prevTotal == total) { // avoid infinite loop
if (prevTotal <= total) { // avoid infinite loop
break;
}
prevTotal = total;
Expand All @@ -1084,7 +1084,7 @@ if (typeof Slick === "undefined") {
total += growSize;
widths[i] += growSize;
}
if (prevTotal == total) { // avoid infinite loop
if (prevTotal >= total) { // avoid infinite loop
break;
}
prevTotal = total;
Expand Down

0 comments on commit e0fa6a8

Please sign in to comment.