Roo/bootstrap/PhoneInput.js
authorjohn <john@roojs.com>
Thu, 29 Mar 2018 02:39:11 +0000 (10:39 +0800)
committerjohn <john@roojs.com>
Thu, 29 Mar 2018 02:39:11 +0000 (10:39 +0800)
Roo/bootstrap/PhoneInput.js

index 2ddd5c9..93251e9 100644 (file)
@@ -480,7 +480,7 @@ Roo.extend(Roo.bootstrap.PhoneInput, Roo.bootstrap.TriggerField, {
             var d = this.getDialCode(v);
             
             //invalid dial code
-            if(!d || d.length == 0 || v.length == 0) {
+            if(v.length == 0 || !d || d.length == 0) {
                 if(this.rendered){
                     this.inputEl().dom.value = (v === null || v === undefined ? '' : v);
                     this.hiddenEl().dom.value = (v === null || v === undefined ? '' : v);