Skip to content

Commit

Permalink
Merge pull request #3409 from Vizzuality/fix/global-tree-cover-located
Browse files Browse the repository at this point in the history
Hot Fix for global tree cover located
  • Loading branch information
edbrett committed May 14, 2018
2 parents 6fbb3c5 + eb2be18 commit 6289a8a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default {
],
units: ['ha', '%'],
categories: ['summary', 'land-cover'],
admins: ['country', 'region'],
admins: ['global', 'country', 'region'],
selectors: ['indicators', 'thresholds', 'units', 'extentYears'],
locationCheck: true,
type: 'extent',
Expand Down Expand Up @@ -70,5 +70,5 @@ export default {
pageSize: 5,
page: 0
},
enabled: false
enabled: true
};
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ const getSettings = state => state.settings || null;
const getOptions = state => state.options || null;
const getIndicator = state => state.indicator || null;
const getLocation = state => state.payload || null;
const getLocationsMeta = state => state[state.adminKey] || null;
const getLocationsMeta = state =>
state[state.adminKey] || state.countries || null;
const getCurrentLocation = state => state.currentLabel || null;
const getColors = state => state.colors || null;
const getSentences = state => state.config && state.config.sentences;
Expand All @@ -23,7 +24,7 @@ export const parseData = createSelector(
const dataMapped = [];
data.forEach(d => {
const region = meta.find(l => d.id === l.value);
if (region) {
if (region || meta === 'global') {
dataMapped.push({
label: (region && region.label) || '',
extent: d.extent,
Expand Down

0 comments on commit 6289a8a

Please sign in to comment.