Skip to content

Commit

Permalink
fix: possible issue when data is not accessible in time series function
Browse files Browse the repository at this point in the history
  • Loading branch information
claustres committed Sep 4, 2024
1 parent ec8e4e3 commit 39d96bf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions map/client/utils/utils.time-series.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import { getForecastForLocation, getForecastProbe, getForecastForFeature } from

async function getDataForVariable(data, variable, forecastLevel) {
data = await data
const time = data.time || data.forecastTime
const runTime = data.runTime
const time = _.get(data, 'time', _.get(data, 'forecastTime'))
const runTime = _.get(data, 'runTime')
const properties = _.get(data, 'properties', {})
// Check if we are targetting a specific variable at level (forecast model case)
const name = (forecastLevel ? `${variable.name}-${forecastLevel}` : variable.name)
Expand Down

0 comments on commit 39d96bf

Please sign in to comment.