tanansatpal / ngx-mat-intl-tel-input

MIT License
62 stars 112 forks source link

I dont set default value #4

Closed cihancelen closed 5 years ago

cihancelen commented 5 years ago

I've used in my angular project. I don't set default value. And error ERROR TypeError: Cannot read property 'country' of undefined at NgxMatIntlTelInputComponent.push../node_modules/ngx-mat-intl-tel-input/fesm5/ngx-mat-intl-tel-input.js.NgxMatIntlTelInputComponent.writeValue (ngx-mat-intl-tel-input.js:693) at setUpControl (forms.js:2057)

tanansatpal commented 5 years ago

Hi @cihancelen , This error could only be triggered when you have passed some default value. Might be in your case instead of a blank string you must have sent a space in the string. Till the time it is not fixed, you could send a blank string instead of a space in the string.

tanansatpal commented 5 years ago

Fixed in the latest release 2.0.2