Skip to content

Commit

Permalink
fix(gadm): fix validation of adm level
Browse files Browse the repository at this point in the history
make sure the adm_level is a number
  • Loading branch information
willian-viana committed Jan 23, 2025
1 parent 7332af6 commit 3ec9143
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ export const getSentence = createSelector(

let locationNames = [locationNameTranslated];

if (adm_level === 2) {
if (Number(adm_level) === 2) {
locationNames = [
locationNameTranslated,
translateText(name_1),
translateText(country),
];
}

if (adm_level === 1) {
if (Number(adm_level) === '1') {
locationNames = [locationNameTranslated, translateText(country)];
}

Expand Down

0 comments on commit 3ec9143

Please sign in to comment.