Skip to content

Commit

Permalink
Don't suggest brands from incompatible countries in the Name field (c…
Browse files Browse the repository at this point in the history
…lose #6479)
  • Loading branch information
quincylvania committed Nov 7, 2019
1 parent 538829d commit f45670a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions modules/ui/fields/localized.js
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

0 comments on commit f45670a

Please sign in to comment.