Skip to content

Conversation

@aweary
Copy link
Contributor

@aweary aweary commented Mar 12, 2018

Fixes #12349. See #12349 (comment).

Using new Map(iterable) isn't supported in IE11, so it ends up trying to iterate through an empty map and these attributes don't get defined in properties. Since this is only run once on startup inlining the attributeName array is probably fine.

Copy link
Contributor

@nhunzaker nhunzaker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

['httpEquiv', 'http-equiv'],
]).forEach((attributeName, name) => {
['acceptCharset', 'className', 'htmlFor', 'httpEquiv'].forEach((name, i) => {
const attributeName = ['accept-charset', 'class', 'for', 'http-equiv'][i];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

might be clearer if it was an array of array pairs? Like maybe just the argument to the original map. Less likely to accidentally shift one array but not the other

Copy link
Contributor

@jquense jquense left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one small thought

Using `new Map(iterable)` isn't supported in IE11, so it ends up trying to iterate through an empty map and these attributes don't get defined in properties. Since this is only run once on startup inlining the attributeName array is probably fine.
@aweary aweary force-pushed the fix-ie11-attribute-name-bug branch from c722931 to 108ad51 Compare March 12, 2018 15:15
Copy link

@blling blling left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@gaearon gaearon merged commit 280acbc into facebook:master Mar 12, 2018
LeonYuAng3NT pushed a commit to LeonYuAng3NT/react that referenced this pull request Mar 22, 2018
…ok#12353)

Using `new Map(iterable)` isn't supported in IE11, so it ends up trying to iterate through an empty map and these attributes don't get defined in properties. Since this is only run once on startup inlining the attributeName array is probably fine.
rhagigi pushed a commit to rhagigi/react that referenced this pull request Apr 19, 2018
…ok#12353)

Using `new Map(iterable)` isn't supported in IE11, so it ends up trying to iterate through an empty map and these attributes don't get defined in properties. Since this is only run once on startup inlining the attributeName array is probably fine.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants