Remove out-of-bounds index comparison

This commit is contained in:
Gabriel Medeiros Coelho 2019-10-17 19:20:36 -03:00 committed by GitHub
parent c26742235f
commit 44cae0e873
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -454,7 +454,7 @@ PlotKit.Layout.prototype._evaluateLineTicksForXAxis = function() {
var tickCount = 0;
this.xticks = new Array();
for (var i = 0; i <= xvalues.length; i++) {
for (var i = 0; i < xvalues.length; i++) {
if (xvalues[i] >= (tickCount) * roughSeparation) {
var pos = this.xscale * (xvalues[i] - this.minxval);
if ((pos > 1.0) || (pos < 0.0))