mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-15 05:30:35 +02:00
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`
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user