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

Unable to render in IE11 using React 15 #49

Closed
davegw opened this issue Sep 28, 2018 · 2 comments
Closed

Unable to render in IE11 using React 15 #49

davegw opened this issue Sep 28, 2018 · 2 comments

Comments

@davegw
Copy link

davegw commented Sep 28, 2018

Hi there,

Thanks for the library, very useful!

While doing some browser testing, I was unable to render the react-to-print component in IE11. I saw there was a similar issue (#41) that appeared to be resolved in 2.0.0-alpha-3 (the version I'm using). I am using react 15 in my project (package specifies react ^16.2), but I don't see anything specific in the code that would require use of react 16. Copying the code into my codebase as opposed to importing from the node package, fixes the problem, but just posting in case others have run into this issue.

@brittonjg
Copy link

brittonjg commented Oct 4, 2018

I may have run into the same issue as @davegw. If it helps, I can see the following entry reported in Sentry Object doesn't support property or method 'includes'.

I am using React 16.5.2 and 2.0.0-alpha-3 of react-to-print.

Really appreciate your work, let me know if you need any further information.

Edit.

It looks like the issue is when the UserAgent is checked for whether IE 11 is being used or not here https://github.com/gregnb/react-to-print/blob/master/src/index.js#L95

Seems like includes is another thing not supported in IE 11 - https://caniuse.com/#search=includes

@gregnb
Copy link
Collaborator

gregnb commented Oct 7, 2018

react-to-print@2.0.0-alpha-4 should solve this thanks to @MatthewHerbst

@gregnb gregnb closed this as completed Oct 7, 2018
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

3 participants