mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-15 21:48:20 +02:00
If we match a generic name, stop looking
This is for "nextbike" (re: https://github.com/osmlab/name-suggestion-index/issues/4543#issuecomment-796126041)
This commit is contained in:
@@ -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']`
|
||||
|
||||
Reference in New Issue
Block a user