You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The regex for appending default country number doesn't correctly check if the actual country code is already there.
```
default_country_number = 1
number = '9545551212'
number = "#{default_country_number}#{number}" if not number =~ /^(00|\+)/
=> "19545551212"
number = "19545551212"
number = "#{default_country_number}#{number}" if not number =~ /^(00|\+)/
=> "119545551212"
```
etc.
Fixed:
```
default_country_number = 1
number = '9545551212'
number = "#{default_country_number}#{number}" if not number =~ /^(00|\+)?#{default_country_number}/
=> "19545551212"
number = "#{default_country_number}#{number}" if not number =~ /^(00|\+)?#{default_country_number}/
=> "19545551212"
```
Sponsored-by: CentroNet Marketing
See mjc@fd2abb5
The text was updated successfully, but these errors were encountered: