forked from ddrilling/asb_cloud_front
Исправлена ошибка при попытке получения границ данных по скважине без них
This commit is contained in:
parent
29ce0d781b
commit
9a4f048ad2
@ -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))
|
||||
|
Loading…
Reference in New Issue
Block a user