From 9a4f048ad2bfdf7f4c2314a6f8b6ba34f1c3de4b Mon Sep 17 00:00:00 2001 From: goodmice Date: Tue, 23 Nov 2021 15:43:49 +0500 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B0=20=D0=BE=D1=88=D0=B8=D0=B1=D0=BA=D0=B0=20?= =?UTF-8?q?=D0=BF=D1=80=D0=B8=20=D0=BF=D0=BE=D0=BF=D1=8B=D1=82=D0=BA=D0=B5?= =?UTF-8?q?=20=D0=BF=D0=BE=D0=BB=D1=83=D1=87=D0=B5=D0=BD=D0=B8=D1=8F=20?= =?UTF-8?q?=D0=B3=D1=80=D0=B0=D0=BD=D0=B8=D1=86=20=D0=B4=D0=B0=D0=BD=D0=BD?= =?UTF-8?q?=D1=8B=D1=85=20=D0=BF=D0=BE=20=D1=81=D0=BA=D0=B2=D0=B0=D0=B6?= =?UTF-8?q?=D0=B8=D0=BD=D0=B5=20=D0=B1=D0=B5=D0=B7=20=D0=BD=D0=B8=D1=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/Archive/index.jsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pages/Archive/index.jsx b/src/pages/Archive/index.jsx index 2af7596..4cdc67b 100644 --- a/src/pages/Archive/index.jsx +++ b/src/pages/Archive/index.jsx @@ -105,7 +105,8 @@ export default function Archive({idWell}) { useEffect(() => invokeWebApiWrapperAsync( async () => { - const dates = await TelemetryDataSaubService.getDataDatesRange(idWell) + let dates = await TelemetryDataSaubService.getDataDatesRange(idWell) + if (!dates) dates = {} dates.from = new Date(dates.from ?? (Date.now() - chartInterval)) dates.to = new Date(dates.to ?? Date.now()) const startDate = new Date(Math.max(dates.from, +dates.to - chartInterval))