Skip to content

Commit

Permalink
Fix issue #29
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasG77 committed Feb 18, 2022
1 parent 9aa5b6a commit 27eb907
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions build/codes-postaux.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,7 @@ const codesPostauxIndex = groupBy(codesPostaux, 'codeCommune')

function getCodesPostaux(codeCommune) {
if (codeCommune in codesPostauxIndex) {
return codesPostauxIndex[codeCommune].map(i => i.codePostal)
}

// Cas spécifique de la commune de Suzan (non présente dans le fichier des codes postaux)
// Source Wikidata (https://www.wikidata.org/wiki/Q1363310)
if (codeCommune === '09304') {
return ['09240']
return Array.from(new Set(codesPostauxIndex[codeCommune].map(i => i.codePostal)))
}

return []
Expand Down

0 comments on commit 27eb907

Please sign in to comment.