diff --git a/javascript/i18n/phonenumbers/phonenumberutil.js b/javascript/i18n/phonenumbers/phonenumberutil.js index ba427426a..bcb119786 100644 --- a/javascript/i18n/phonenumbers/phonenumberutil.js +++ b/javascript/i18n/phonenumbers/phonenumberutil.js @@ -4759,8 +4759,7 @@ i18n.phonenumbers.PhoneNumberUtil.prototype.canBeInternationallyDialled = */ i18n.phonenumbers.PhoneNumberUtil.matchesEntirely = function(regex, str) { /** @type {Array.} */ - 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; }