Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/release-0.1.0' into release-0.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtyomVancyan committed Mar 2, 2023
2 parents 5aceb4a + aa6fddf commit efc7437
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 1 deletion.
18 changes: 18 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Tests

on: push

jobs:
tests:

runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Install dependencies
run: yarn && yarn install

- name: Run tests
run: yarn test
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Advanced Phone Number Input for [Ant Design](https://github.com/ant-design/ant-d
[![types](https://img.shields.io/npm/types/antd-phone-input)](https://www.npmjs.com/package/antd-phone-input)
[![License](https://img.shields.io/npm/l/antd-phone-input)](https://github.com/ArtyomVancyan/antd-phone-input/blob/master/LICENSE)
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://makeapullrequest.com)
[![Tests](https://github.com/ArtyomVancyan/antd-phone-input/actions/workflows/tests.yml/badge.svg)](https://github.com/ArtyomVancyan/antd-phone-input/actions/workflows/tests.yml)

## Install

Expand Down
2 changes: 1 addition & 1 deletion src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type Timezone = keyof typeof timezones;
const getDefaultISO2Code = () => {
/** Returns the default ISO2 code based on the user's timezone */
const timezone = Intl.DateTimeFormat().resolvedOptions().timeZone as Timezone;
return timezones[timezone].toLowerCase() || "us";
return (timezones[timezone] || "").toLowerCase() || "us";
}

const parsePhoneNumber: ParsePhoneNumber = (value, data, formattedNumber) => {
Expand Down

0 comments on commit efc7437

Please sign in to comment.