Don't suggest brands from incompatible countries in the Name field (close #6479)

This commit is contained in:
Quincy Morgan
2019-11-07 19:21:00 +01:00
parent 538829d171
commit f45670a9a7

View File

@@ -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];