Skip to content

Commit

Permalink
Simplify code
Browse files Browse the repository at this point in the history
  • Loading branch information
SG-Kang authored Dec 13, 2024
1 parent 7666d15 commit 6c37d57
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions javascript/i18n/phonenumbers/phonenumberutil.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 6c37d57

Please sign in to comment.