Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: undefined is not a constructor (evaluating 'email.normalize('NFC')') #32

Open
rokoroku opened this issue Nov 11, 2017 · 1 comment

Comments

@rokoroku
Copy link
Contributor

rokoroku commented Nov 11, 2017

TypeError: undefined is not a constructor (evaluating 'email.normalize('NFC')')

Caused by calling str.normalize() in the isemail module

String.prototype.normalize() is not supported in every browsers.
Adding polyfill like unorm or just adding mock function returns itself fixes the issue.

@rokoroku
Copy link
Contributor Author

Here's my simple workaround:

if (typeof String.prototype.normalize === 'undefined') {
  String.prototype.normalize = function () { return this; };
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant