mirror of
https://github.com/FoggedLens/iD.git
synced 2026-03-30 08:50:32 +02:00
Fix potential error in crossing ways validation
This commit is contained in:
@@ -307,8 +307,9 @@ export function validationCrossingWays(context) {
|
||||
(!member.role || member.role === 'outer' || member.role === 'inner')) {
|
||||
var entity = graph.hasEntity(member.id);
|
||||
// don't add duplicates
|
||||
if (!entity || array.indexOf(entity) !== -1) return;
|
||||
array.push(entity);
|
||||
if (entity && array.indexOf(entity) === -1) {
|
||||
array.push(entity);
|
||||
}
|
||||
}
|
||||
return array;
|
||||
}, []);
|
||||
|
||||
Reference in New Issue
Block a user