mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 09:12:52 +00:00
Fix issue with prerequisiteTag
This commit is contained in:
@@ -327,7 +327,8 @@ export function uiField(context, presetField, entityIDs, options) {
|
||||
if (entityIDs &&
|
||||
!tagsContainFieldKey() && // ignore tagging prerequisites if a value is already present
|
||||
prerequisiteTag) {
|
||||
return entityIDs.some(function(entityID) {
|
||||
|
||||
if (!entityIDs.every(function(entityID) {
|
||||
var entity = context.graph().entity(entityID);
|
||||
if (prerequisiteTag.key) {
|
||||
var value = entity.tags[prerequisiteTag.key];
|
||||
@@ -342,7 +343,8 @@ export function uiField(context, presetField, entityIDs, options) {
|
||||
} else if (prerequisiteTag.keyNot) {
|
||||
if (entity.tags[prerequisiteTag.keyNot]) return false;
|
||||
}
|
||||
});
|
||||
return true;
|
||||
})) return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user