Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanlurie committed Sep 4, 2024
1 parent 556764c commit 604d381
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/language.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1014,7 +1014,6 @@ export const Language = {
} as LanguageInfo,
} as const;


/**
* Get language infos from a provided language key, the key being the no-whitespace capital name.
* By default, the language dictionnary to look into is the one defined in this library, but another one could be provided
Expand Down Expand Up @@ -1084,7 +1083,6 @@ export function getAutoLanguage(): LanguageInfo {
return canditatelangs[0] ?? Language.ENGLISH;
}


export function isLanguageInfo(obj: unknown): obj is LanguageInfo {
return (
obj !== null &&
Expand Down Expand Up @@ -1123,10 +1121,12 @@ export function toLanguageInfo(
return null;
}

return getLanguageInfoFromKey(lang, languageDictionnary) ||
return (
getLanguageInfoFromKey(lang, languageDictionnary) ||
getLanguageInfoFromCode(lang, languageDictionnary) ||
getLanguageInfoFromFlag(lang, languageDictionnary) ||
null;
null
);
}

/**
Expand Down

0 comments on commit 604d381

Please sign in to comment.