Skip to content

Commit

Permalink
Merge pull request #1582 from ClimateWatch-Vizzuality/fix/custom-comp…
Browse files Browse the repository at this point in the history
…are-same-country

Fix/custom compare same country
  • Loading branch information
tsubik authored May 24, 2022
2 parents 67de4ab + 2899d7b commit 889d4e9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ GEM
net-ssh (>= 2.6.5, < 7.0.0)
net-ssh (6.1.0)
nio4r (2.5.8)
nokogiri (1.13.5)
nokogiri (1.13.6)
mini_portile2 (~> 2.8.0)
racc (~> 1.4)
oj (3.6.8)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,16 +128,13 @@ export const getSectoralInformationData = createSelector(
],
[]
);
const countries = uniq(
selectedTargets.map(({ country }) => country)
);

Object.entries(groupBy(values, 'group_index')).forEach(
([groupIndex, groupIndexValues]) => {
const descriptions = [];
countries.forEach(country => {
selectedTargets.forEach(({ country, document }) => {
const valueObject = groupIndexValues.find(
v => v.country === country
v => v.country === country && v.document_slug === document
);
const value =
(valueObject && valueObject.value) ||
Expand Down

0 comments on commit 889d4e9

Please sign in to comment.