From 38aab9cf1d6fcc9f1372cfa16f0fc1fe4b1fe1ac Mon Sep 17 00:00:00 2001 From: MiniPear Date: Wed, 20 Dec 2023 17:46:26 +0800 Subject: [PATCH] fix(time): remove debug code --- package.json | 2 +- src/utils/time-interval.ts | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 59f3c78..8fe1b98 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@antv/scale", - "version": "0.4.14", + "version": "0.4.15", "description": "Toolkit for mapping abstract data into visual representation.", "license": "MIT", "main": "lib/index.js", diff --git a/src/utils/time-interval.ts b/src/utils/time-interval.ts index 2ba6cc5..87b2efc 100644 --- a/src/utils/time-interval.ts +++ b/src/utils/time-interval.ts @@ -63,8 +63,7 @@ export function createInterval(duration: number, floorish: TimeProcess, offseti: const ticks = []; const roundStep = Math.floor(step); const t = shouldAdjust ? ceil(start, step) : ceil(start); - let index = 0; - for (let i = t; +i < +stop && index < 10; offseti(i, roundStep), floori(i), index += 1) { + for (let i = t; +i < +stop; offseti(i, roundStep), floori(i)) { ticks.push(new Date(+i)); } return ticks;