Skip to content

Commit

Permalink
Make sure that the values are valid before changing rowHeight estimate
Browse files Browse the repository at this point in the history
  • Loading branch information
kriszyp committed Feb 18, 2012
1 parent 463545e commit d06b58e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions OnDemandList.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ return declare([List, _StoreMixin], {
for(var i = 0; i < trCount; i++){
height += trs[i].offsetHeight;
}
// only update rowHeight if we actually got results
if(trCount){ self.rowHeight = height / trCount; }
// only update rowHeight if we actually got results and are visible
if(trCount && height){ self.rowHeight = height / trCount; }

total -= trCount;
preload.count = total;
Expand Down
2 changes: 1 addition & 1 deletion test/dijit_layout_programmatic.html
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
// TabContainer
var tc = new TC({
id: "tab",
class: "bcCenter",
"class": "bcCenter",
region: "center"
});

Expand Down

0 comments on commit d06b58e

Please sign in to comment.