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

Fix our custom element serializer in IE11 #8967

Merged
merged 1 commit into from
Aug 14, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions packages/element/src/serialize.js
Original file line number Diff line number Diff line change
Expand Up @@ -512,11 +512,17 @@ export function renderElement( element, context, legacyContext = {} ) {

return renderElement( type( props, legacyContext ), context, legacyContext );
}

// React polyfills the symbol constants REACT_PROVIDER_TYPE and REACT_CONTEXT_TYPE
// using the 0xeacd and 0xeace numbers in IE11.
// See https://github.com/facebook/react/blob/master/packages/shared/ReactSymbols.js
switch ( type && type.$$typeof ) {
case REACT_PROVIDER_TYPE:
case 0xeacd:
return renderChildren( props.children, props.value, legacyContext );

case REACT_CONTEXT_TYPE:
case 0xeace:
return renderElement( props.children( context || type._currentValue ), context, legacyContext );
}

Expand Down