Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prop 'mode' set on national crashes nuxt #61

Open
olinox14 opened this issue Sep 14, 2021 · 0 comments
Open

Prop 'mode' set on national crashes nuxt #61

olinox14 opened this issue Sep 14, 2021 · 0 comments

Comments

@olinox14
Copy link

olinox14 commented Sep 14, 2021

I'm working on a nuxt application which is running on docker.
If I add the prop mode="national" in my tag, the page crash and the following
message appears in the console:

TypeError: _vm.activeCountry.iso2 is undefined
    fn vue-tel-input-vuetify.vue:42
    normalized VueJS

My tag looks like this:

 <vue-tel-input-vuetify
    field="phone"
    :label="$t('phone')"
    :value="entry['phone']"
    :preferredCountries="['FR', 'DE', 'CH', 'BE', 'GB']"
    :invalidMsg="$t('phoneInvalid')"
    mode="national"
  />

An expected behavior could be a fallback in international mode when an error occured with the national mode.

Libraries:

vuex-orm/core": "1.0.0-draft.14
nuxt: 2.15
nuxtjs/vuetify: 1.12.1,
vue-tel-input-vuetify: 1.4.1

Environment: Docker, debian based container

UPDATE

If I'm not mistaken, the error comes from the line 27 of vue-tel-input-vuetify.vue:

<div :class="activeCountry.iso2.toLowerCase()" class="vti__flag" />

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant