From 34b551772d3a21d823e42864f99d5f925ff9273a Mon Sep 17 00:00:00 2001 From: Reno McKenzie Date: Fri, 12 Jan 2018 11:33:59 -0800 Subject: [PATCH] Changed line that sets countryCode. Now, when CC is invalid, it is set to null and therefor not changed --- src/components/IntlTelInputApp.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/IntlTelInputApp.js b/src/components/IntlTelInputApp.js index a5e507627..e1a9e6f67 100644 --- a/src/components/IntlTelInputApp.js +++ b/src/components/IntlTelInputApp.js @@ -719,7 +719,7 @@ class IntlTelInputApp extends Component { // invalid dial code, so empty // Note: use getNumeric here because the number has not been // formatted yet, so could contain bad chars - countryCode = ''; + countryCode = null; } else if (!number || number === '+') { // empty, or just a plus, so default countryCode = this.defaultCountry;