diff --git a/src/pages/Archive/index.jsx b/src/pages/Archive/index.jsx index 7333e0f..01de787 100644 --- a/src/pages/Archive/index.jsx +++ b/src/pages/Archive/index.jsx @@ -74,7 +74,7 @@ export default function Archive({idWell}) { const offset = e.deltaY * chartInterval * WHEEL_SENSITIVITY const nextStartDate = +prevStartDate + offset const firstPossibleDate = Math.max(loaded.start, dateLimit.from) - const lastPossibleDate = Math.min(loaded.end, Date.now()) - chartInterval + const lastPossibleDate = Math.min(dateLimit.to, (loaded.end ?? Date.now())) - chartInterval return new Date(Math.max(firstPossibleDate, Math.min(nextStartDate, lastPossibleDate))) }) }