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

Not working on IE11 after upgrading to v5 #336

Closed
satazor opened this issue Nov 16, 2017 · 3 comments
Closed

Not working on IE11 after upgrading to v5 #336

satazor opened this issue Nov 16, 2017 · 3 comments
Labels
bug

Comments

@satazor
Copy link

@satazor satazor commented Nov 16, 2017

react-helmet@5 uses requestAnimationFrame which IE 11 supports but has a weird bug in strict mode (which is turned on automatically when you use es6 modules).

Basically it must be either called with window context or bound to it or it will throw with Invalid calling object. See this thread that describes the same bug in vuejs: vuejs/vue#4465 and also their fix to it: ant-design/ant-design@0a9a388#diff-3537c7c5164da1c7f03e6eed0346218fR20.

@kernle32dll
Copy link

@kernle32dll kernle32dll commented Nov 16, 2017

One could probably use #314 as a workaround till this issue is fixed properly.

@satazor
Copy link
Author

@satazor satazor commented Nov 16, 2017

@kernle32dll apparently I need to set defer to false in all places where I use <Helmet>. A solution is to create a Helmet wrapper that sets defer to false in its defaultProps but feels cumbersome.

@satazor
Copy link
Author

@satazor satazor commented Nov 16, 2017

@kernle32dll ended up doing this:

// Force default defer to `false` until Helmet works out a bug on IE11
// See: https://github.com/nfl/react-helmet/issues/336
Helmet.defaultProps.defer = false;

Hacky, but works for now.

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

Successfully merging a pull request may close this issue.

3 participants