Skip to content

Commit

Permalink
some typing
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanlurie committed Sep 4, 2024
1 parent 3f65b69 commit 556764c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/services/geocoding.ts
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ function addLanguageGeocodingOptions(
function toValidGeocodingLanguageCode(
lang: string | LanguageInfo,
): string | null {
let langInfo = null;
let langInfo: LanguageInfo | null = null;

if (lang === Language.AUTO.flag) {
// equal to the string "auto"
Expand All @@ -294,8 +294,8 @@ function toValidGeocodingLanguageCode(
: getLanguageInfoFromFlag(lang.flag);
}

if (langInfo?.geocoding) return langInfo.code;

if (!langInfo) return null;
if (langInfo.geocoding) return langInfo.code;
return null;
}

Expand Down

0 comments on commit 556764c

Please sign in to comment.