Closed ahmed-hyd closed 6 years ago
There's no replace_characters
function in this library.
The problem is occurring when I am making the following call
const asYouTypes = new asYouType(this.state.country); const text = asYouTypes.input(value);
The exception seems to be occurring in the following auto-generated javascript function
` function replace_characters(text, replacements) { var replaced = '';
var _iteratorNormalCompletion2 = true;
var _didIteratorError2 = false;
var _iteratorError2 = undefined;
try {
for (var _iterator2 = (0, _getIterator3.default)(text), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
var character = _step2.value;
var replacement = replacements[character.toUpperCase()];
if (replacement !== undefined) {
replaced += replacement;
}
}
} catch (err) {
_didIteratorError2 = true;
_iteratorError2 = err;
} finally {
try {
if (!_iteratorNormalCompletion2 && _iterator2.return) {
_iterator2.return();
}
} finally {
if (_didIteratorError2) {
throw _iteratorError2;
}
}
}
return replaced;
}`
Hi,
While using libphonenumber-js along with Google reCaptcha, we are getting the error "Exception thrown and not caught" on the function replace_characters. This issue is happening only on newer versions of IE11 on Windows OS.
I have uploaded a POC here.
IE version used: 11.0.9600.18130
Please suggest how we can mitigate this.
Thanks, Ahmed M