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

Number.isNaN and Number.parseInt breaks app in IE #343

Open
gwak opened this issue Feb 20, 2017 · 5 comments
Open

Number.isNaN and Number.parseInt breaks app in IE #343

gwak opened this issue Feb 20, 2017 · 5 comments

Comments

@gwak
Copy link

gwak commented Feb 20, 2017

Hi,

I don't think you should use Number.isNaN and Number.parseInt in the lt-body component:
https://github.com/offirgolan/ember-light-table/blob/master/addon/components/lt-body.js
as it breaks apps in IE. I've tested IE 11.
I think you should use a polyfill or isNaN, and parseInt directly.

Thanks,
Camille

@gwak
Copy link
Author

gwak commented Feb 20, 2017

Well actually it can be fixed by adding the following in ember-cli-build.js:

"ember-cli-babel": {
  includePolyfill: true
}

@alexander-alvarez
Copy link
Collaborator

We took the approach of doing alphasights/ember-scrollable#69 in ember-scrollable. It's pretty trivial to add if someone wants to bother with it and maybe save someone else headache.

A more involved but proper solution would be to leverage the new targets in 2.12+

@buschtoens
Copy link
Collaborator

buschtoens commented Jun 21, 2017

A more involved but proper solution would be to leverage the new targets in 2.12+

Turns out targets don't currently include polyfills, but only manage transpilation. 🙁

image

https://embercommunity.slack.com/archives/C045BNHAP/p1498049676269826

@alexander-alvarez
Copy link
Collaborator

thanks for the investigation @buschtoens
It seems like the logical next steps for targets, I clearly overstated what targets can do (for now).
I updated #430 do you think that's the right approach?

@buschtoens
Copy link
Collaborator

I do have a spike to make ember-cli-babel build a more minimal polyfill

Until we get this functionality, a conditional polyfill in index.js seems like a sensible solution.

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

No branches or pull requests

4 participants