File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
intl_tel_input/static/intl_tel_input Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change 55 inputs = $ ( cssClass ) ;
66
77 inputs . each ( function ( i , el ) {
8+
89 $el = $ ( el ) ;
910 $realInput = $el . prev ( ) ;
1011 data = $el . data ( ) ;
1112 defaultCode = data . defaultCode !== undefined ? data . defaultCode : 'us' ;
1213 options = {
13- initialCountry : data . autoGeoIp ? 'auto' : data . defaultCode ,
14+ initialCountry : data . autoGeoIp !== undefined ? 'auto' : data . defaultCode ,
1415 geoIpLookup : function ( callback ) {
15- if ( data . autoGeoIp ) {
16+ if ( data . autoGeoIp !== undefined ) {
1617 $ . get ( '//freegeoip.net/json/' , function ( ) { } , "jsonp" ) . done ( function ( resp ) {
1718 var countryCode = ( resp && resp . country_code ) ? resp . country_code : "" ;
1819 callback ( countryCode ) ;
2627 } ;
2728
2829 options . utilsScript = 'https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/9.0.1/js/utils.js' ;
30+ options . preferredCountries = data . preferredCountries ,
31+
2932
3033 $el . intlTelInput ( options )
3134 . done ( function ( ) {
You can’t perform that action at this time.
0 commit comments