From d718202b0ed63d22dc4c69ed15d82efc8d232c7a Mon Sep 17 00:00:00 2001 From: Mike Bostock Date: Fri, 2 Dec 2022 15:57:19 -0800 Subject: [PATCH] localize let --- src/interval.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/interval.js b/src/interval.js index 9c4a37a..492ae90 100644 --- a/src/interval.js +++ b/src/interval.js @@ -25,10 +25,10 @@ export function timeInterval(floori, offseti, count, field) { interval.range = (start, stop, step) => { const range = []; - let previous; start = interval.ceil(start); step = step == null ? 1 : Math.floor(step); if (!(start < stop) || !(step > 0)) return range; // also handles Invalid Date + let previous; do range.push(previous = new Date(+start)), offseti(start, step), floori(start); while (previous < start && start < stop); return range;