Skip to content

Commit

Permalink
Merge pull request #511 from pelias/do-not-create-duplicate-names
Browse files Browse the repository at this point in the history
fix(doc): Do not allow duplicate names to be created
  • Loading branch information
orangejulius authored Aug 13, 2020
2 parents 12cd520 + a6c80a2 commit 8a35d6d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/peliasDocGenerators.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,9 @@ function setupDocument(record, hierarchy) {
else {
if (record.name_aliases.length) {
record.name_aliases.forEach(alias => {
wofDoc.setNameAlias('default', alias);
if (alias !== record.name) {
wofDoc.setNameAlias('default', alias);
}
});
}
if (record.name_langs) {
Expand Down

0 comments on commit 8a35d6d

Please sign in to comment.