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

IE 11 Error: Object doesn't support property or method 'isNaN' #559

Closed
wkgalla opened this issue Apr 5, 2018 · 4 comments
Closed

IE 11 Error: Object doesn't support property or method 'isNaN' #559

wkgalla opened this issue Apr 5, 2018 · 4 comments

Comments

@wkgalla
Copy link

wkgalla commented Apr 5, 2018

Bug, Feature, or Question?

Bug

Current Behavior

Object doesn't support property or method 'isNaN' error in IE 11 when input component type is number.
And field value remains same.

Desired Behavior

It should update value on typing new value

Suggested Solutions

It might be due to this change #437

  • Formik Version: 0.11.11
  • React Version: 15.6.2
  • TypeScript Version: 2.6.2
  • OS: windows 10
  • Node Version: 8.4.0
  • Package Manager and Version: npm 5.6
@piotrwitek
Copy link
Contributor

Hi @jaredpalmer, here is the line in question: https://github.com/jaredpalmer/formik/pull/437/files#diff-34219b6b803d5570dffa8d0b3695a6b7R425

To fix this we may use a global isNaN instead of Number.isNaN (the latter is not supported by IE)

@Ciaran0
Copy link

Ciaran0 commented Apr 13, 2018

Having the same issue as described above on ie11

@jaredpalmer
Copy link
Owner

Lets get a PR going

@Ciaran0
Copy link

Ciaran0 commented Apr 16, 2018

For anyone that needs a solution asap, to solve this I included the Number.isNan polyfill from core-js.
I like the lodash.isnan solution from @ohbarye

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

4 participants