Skip to content

Commit

Permalink
fix: prevent infinite loop in parsedMode calculation (#463)
Browse files Browse the repository at this point in the history
  • Loading branch information
jdbacero authored May 9, 2024
1 parent 3ab2c7d commit e058acb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/vue-tel-input.vue
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@
const parsedMode = computed<Lowercase<NumberFormat>>(() => {
const mode = toLowerCase(props.mode)
if (mode === 'auto') {
if (!data.phone || data.phone?.startsWith('+')) {
if (!data.phone?.startsWith('+')) {
return 'national';
}
return 'international';
Expand Down

0 comments on commit e058acb

Please sign in to comment.