Skip to content

Commit

Permalink
Ensure that gutterOffset is never NaN by not dividing by zero
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanboktae committed Feb 24, 2016
1 parent 74712db commit e7a5bae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ace/virtual_renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -1032,7 +1032,7 @@ var VirtualRenderer = function(container, theme) {
minHeight : minHeight,
maxHeight : maxHeight,
offset : offset,
gutterOffset : Math.max(0, Math.ceil((offset + size.height - size.scrollerHeight) / lineHeight)),
gutterOffset : lineHeight ? Math.max(0, Math.ceil((offset + size.height - size.scrollerHeight) / lineHeight)) : 0,
height : this.$size.scrollerHeight
};

Expand Down

0 comments on commit e7a5bae

Please sign in to comment.