Skip to content

Commit

Permalink
Merge pull request #8 from shimondoodkin/fix-jshint-d-used-out-of-scope
Browse files Browse the repository at this point in the history
fix jshint d used out of scope
  • Loading branch information
shimondoodkin authored Apr 5, 2018
2 parents 007de8b + 6fe7970 commit ed4d2c7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions js/Date.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,15 +97,15 @@ Flotr.Date = {
ticks = [],
tickSize = axis.tickSize,
tickUnit,
formatter, i;
formatter, i ,d;

// Use custom formatter or time tick formatter
formatter = (options.tickFormatter === Flotr.defaultTickFormatter ?
this.formatter : options.tickFormatter
);

for (i = 0; i < spec.length - 1; ++i) {
var d = spec[i][0] * timeUnits[spec[i][1]];
d = spec[i][0] * timeUnits[spec[i][1]];
if (delta < (d + spec[i+1][0] * timeUnits[spec[i+1][1]]) / 2 && d >= tickSize)
break;
}
Expand All @@ -127,7 +127,7 @@ Flotr.Date = {
axis.tickSize = tickSize;

var step = tickSize * timeUnits[tickUnit];
var d = new Date(min);
d = new Date(min);

function setTick (name) {
set(d, name, mode, Flotr.floorInBase(
Expand Down

0 comments on commit ed4d2c7

Please sign in to comment.