Skip to content

Commit

Permalink
fix: Remove dead code from server implementation
Browse files Browse the repository at this point in the history
Out implementation of `getLanguage()` does have a fallback to English,
so it does never return `undefined` or an empty string.

Signed-off-by: Ferdinand Thiessen <rpm@fthiessen.de>
  • Loading branch information
susnux committed Jan 22, 2023
1 parent dfc8888 commit c805746
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions lib/translation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -211,10 +211,6 @@ export function getPlural(number: number) {
language = 'xbr'
}

if (typeof language === 'undefined' || language === '') {
return number === 1 ? 0 : 1
}

if (language.length > 3) {
language = language.substring(0, language.lastIndexOf('-'))
}
Expand Down

0 comments on commit c805746

Please sign in to comment.