Browse Source

Fix regex logic

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

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

@ -4760,7 +4760,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);
str.match('^(?:' + regex + ')$') : str.match("^(?:" + regex.source + ")$");
if (matchedGroups && matchedGroups[0].length == str.length) {
return true;
}


Loading…
Cancel
Save