Browse Source

Simplify code

pull/3769/head
SG-Kang 1 year ago
committed by GitHub
parent
commit
6c37d573bb
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 2 deletions
  1. +1
    -2
      javascript/i18n/phonenumbers/phonenumberutil.js

+ 1
- 2
javascript/i18n/phonenumbers/phonenumberutil.js View File

@ -4759,8 +4759,7 @@ i18n.phonenumbers.PhoneNumberUtil.prototype.canBeInternationallyDialled =
*/
i18n.phonenumbers.PhoneNumberUtil.matchesEntirely = function(regex, str) {
/** @type {Array.<string>} */
var matchedGroups = (typeof regex == 'string') ?
str.match('^(?:' + regex + ')$') : str.match("^(?:" + regex.source + ")$");
var matchedGroups = b2.match('^(?:' + (typeof a2 == 'string' ? a2 : a2.source) + ')$')
if (matchedGroups && matchedGroups[0].length == str.length) {
return true;
}


Loading…
Cancel
Save