diff --git a/modules/ui/success.js b/modules/ui/success.js index 7b424016a6..0e83853dd4 100644 --- a/modules/ui/success.js +++ b/modules/ui/success.js @@ -130,9 +130,8 @@ export function uiSuccess(context) { var matchIDs = matchFeatures.map(function(feature) { return feature.id; }); // Gather community resources that are either global or match a polygon. - var matchResources = data.community.resources.filter(function(v) { - return !v.featureId || matchIDs.indexOf(v.featureId) !== -1; - }); + var matchResources = Object.values(data.community.resources) + .filter(function(v) { return !v.featureId || matchIDs.indexOf(v.featureId) !== -1; }); if (matchResources.length) { // sort by size ascending, then by community rank