mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 01:02:58 +00:00
Don't suggest brands from incompatible countries in the Name field (close #6479)
This commit is contained in:
@@ -301,6 +301,11 @@ export function uiFieldLocalized(field, context) {
|
||||
if (value && value.length > 2) {
|
||||
for (var i = 0; i < suggestions.length; i++) {
|
||||
var s = suggestions[i];
|
||||
|
||||
// don't suggest brands from incompatible countries
|
||||
if (_countryCode && s.countryCodes &&
|
||||
s.countryCodes.indexOf(_countryCode) === -1) continue;
|
||||
|
||||
var sTag = s.id.split('/', 2);
|
||||
var sKey = sTag[0];
|
||||
var sValue = sTag[1];
|
||||
|
||||
Reference in New Issue
Block a user