Skip to content

Commit

Permalink
fix: duplicated variables appear when probing
Browse files Browse the repository at this point in the history
  • Loading branch information
claustres committed Sep 4, 2024
1 parent 961856a commit 3ff0a6d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/MapActivity.vue
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ export default {
getHighlightTooltip (feature, layer, options) {
if ((options.name === kMapComposables.HighlightsLayerName) && this.isWeatherProbe(feature)) {
// Get labels from forecast layers
const layers = _.uniqBy(_.values(this.layers).filter(sift({ tags: ['weather', 'forecast'] })), 'name')
const layers = _.values(this.layers).filter(sift({ tags: ['weather', 'forecast'] }))
const variables = _.reduce(layers, (result, layer) => result.concat(_.get(layer, 'variables', [])), [])
const fields = this.getProbedLocationForecastFields(variables)
const html = this.getForecastAsHtml(feature, fields)
Expand Down
2 changes: 1 addition & 1 deletion src/utils/utils.time-series.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export async function updateTimeSeries (previousTimeSeries) {
const { CurrentActivity, hasSelectedItems, getSelectedItems, hasProbedLocation, getProbedLocation } = kMapComposables.useCurrentActivity()
const activity = unref(CurrentActivity)
// Weather probe targets variables coming from multiple layers
const forecastLayers = _.uniqBy(_.values(activity.layers).filter(sift({ tags: ['weather', 'forecast'] })), 'name')
const forecastLayers = _.values(activity.layers).filter(sift({ tags: ['weather', 'forecast'] }))
const featureLevel = activity.selectableLevelsLayer ? ` - ${activity.selectedLevel} ${activity.selectableLevels.unit}` : ''

let timeSeries = []
Expand Down

0 comments on commit 3ff0a6d

Please sign in to comment.