Skip to content

Commit

Permalink
fix(component): fix issue switching countries
Browse files Browse the repository at this point in the history
fix issue switching countries changes phone numbers incorrectly

fix #22
  • Loading branch information
yogakurniawan committed Jul 28, 2020
1 parent a2f43b4 commit bf6e26e
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 15 deletions.
10 changes: 5 additions & 5 deletions dist/vue-tel-input-vuetify.esm.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/vue-tel-input-vuetify.min.js

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions dist/vue-tel-input-vuetify.umd.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions lib/vue-tel-input-vuetify.vue
Original file line number Diff line number Diff line change
Expand Up @@ -568,11 +568,11 @@ export default {
this.phone
&& this.phone[0] === '+'
&& this.activeCountry.iso2
&& this.phoneObject.number.national
&& this.phoneObject.number.significant
) {
// Attach the current phone number with the newly selected country
this.phone = PhoneNumber(
this.phoneObject.number.national,
this.phoneObject.number.significant,
this.activeCountry.iso2,
).getNumber('international');
} else if (
Expand Down
4 changes: 2 additions & 2 deletions src/lib/vue-tel-input-vuetify.vue
Original file line number Diff line number Diff line change
Expand Up @@ -568,11 +568,11 @@ export default {
this.phone
&& this.phone[0] === '+'
&& this.activeCountry.iso2
&& this.phoneObject.number.national
&& this.phoneObject.number.significant
) {
// Attach the current phone number with the newly selected country
this.phone = PhoneNumber(
this.phoneObject.number.national,
this.phoneObject.number.significant,
this.activeCountry.iso2,
).getNumber('international');
} else if (
Expand Down

0 comments on commit bf6e26e

Please sign in to comment.