Skip to content

Commit

Permalink
If we match a generic name, stop looking
Browse files Browse the repository at this point in the history
This is for "nextbike"
(re: osmlab/name-suggestion-index#4543 (comment))
  • Loading branch information
bhousel committed Mar 11, 2021
1 parent 98a622f commit d282140
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/services/nsi.js
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ function _upgradeTags(tags, loc) {
const hits = _nsi.matcher.match(tuple.k, tuple.v, tuple.n, loc); // Attempt to match an item in NSI

if (!hits || !hits.length) continue; // no match, try next tuple
if (hits[0].match !== 'primary' && hits[0].match !== 'alternate') continue; // a generic match, try next tuple
if (hits[0].match !== 'primary' && hits[0].match !== 'alternate') break; // a generic match, stop looking

// A match may contain multiple results, the first one is likely the best one for this location
// e.g. `['pfk-a54c14', 'kfc-1ff19c', 'kfc-658eea']`
Expand Down

0 comments on commit d282140

Please sign in to comment.