From 710966801f268eb691401bf45e96d1d5924d56d1 Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Wed, 27 Mar 2019 09:32:31 -0400 Subject: [PATCH] Make sure community index filters on value array, not object (closes #6092) This is breakage related to #6087 in replacing lodash `_.filter` (which can iterate (v,k) over an object) with `Array.filter` --- modules/ui/success.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/ui/success.js b/modules/ui/success.js index 7b424016a..0e83853dd 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