Skip to content

Commit

Permalink
Bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
zoontek committed Jan 29, 2022
1 parent 02e7618 commit eafc21b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-native-localize",
"version": "2.1.8",
"version": "2.1.9",
"license": "MIT",
"description": "A toolbox for your React Native app localization.",
"author": "Mathieu Acthernoene <zoontek@gmail.com>",
Expand Down
6 changes: 3 additions & 3 deletions src/module.web.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export function getCalendar(): Calendar {
}

export function getCountry(): string {
const languages = navigator.languages ?? [navigator.language];
const { languages = [navigator.language] } = navigator;

for (let i = 0; i < languages.length; i++) {
const { countryCode } = splitLanguageTag(languages[i]);
Expand All @@ -68,7 +68,7 @@ export function getCountry(): string {
}

export function getCurrencies(): string[] {
const languages = navigator.languages ?? [navigator.language];
const { languages = [navigator.language] } = navigator;
const currencies: string[] = [];

languages.forEach((language) => {
Expand All @@ -91,7 +91,7 @@ export function getCurrencies(): string[] {
}

export function getLocales(): Locale[] {
const languages = navigator.languages ?? [navigator.language];
const { languages = [navigator.language] } = navigator;
const countryCode = getCountry();
const cache: string[] = [];
const locales: Locale[] = [];
Expand Down

0 comments on commit eafc21b

Please sign in to comment.