question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

IE11 Array.from on List from immutable.js

See original GitHub issue

I have React application with Redux-form. Looks like immutable.js is used internally by React (or Redux). Originally I was going to report an issue for immutable.js, but I realized that issue is reproducible only when polyfill is used (under IE11). Application works fine under FireFox (without polyfill).

Under IE11 (with polyfill) next line in parseIterableLike() looks to be a problem

var arr = parseIterable(usingIterator(items));

That line is called from Array.from polyfill. In my case it should convert List from immutable.js to Array, but in fact original List is returned. As result “items” parameter is assigned to arrayLike as is (without conversion to Array), because in parseIterableLike() at the end “arr” is false.

var arrayLike = Object(parseIterableLike(items));

Because of no conversion in line below I receive 0, since arrayLike.length is undefined (List from immutable.js has only correct size property)

var len = toInteger(arrayLike.length);

Even after manual changing “len” to correct size of list (using debugger), at the end I receive array of “undefined” items, since in next line “[]” operator doesn’t work (because arrayLike is not an array)

kValue = arrayLike[k];

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9

github_iconTop GitHub Comments

1reaction
jennifergarciacommented, Feb 7, 2018

@JakeChampion it looks like 3.26 hasn’t been released yet, do you have an update on when it’s going to be tagged and released?

1reaction
JakeChampioncommented, Jan 9, 2018

3.25 is currently on QA and should be in production next week. This means that 3.26 will go to QA at some point this month (I am aiming for 20th Jan) and production by end of the month.

Read more comments on GitHub >

github_iconTop Results From Across the Web

React internet explorer 11 rendering the result of mapping ...
I have a problem with mapping Immutable array objects in React in internet explorer 11. ... All works fine, in Chrome, Opera, Firefox....
Read more >
Immutable.js
js collections are Iterable, which allows them to be used anywhere an Iterable is expected, such as when spreading into an Array. const...
Read more >
Writing Reducers with Immer | Redux Toolkit - JS.ORG
Basics of Immutability​. "Mutable" means "changeable". If something is "immutable", it can never be changed. JavaScript objects and arrays are all ...
Read more >
immutable-assign - npm
Most immutable JavaScript libraries try to encapsulate the data and ... Example 2: Update 1st level list/array elements, it has skipped the ...
Read more >
CHANGELOG.md - immutable-js/immutable-js - Sourcegraph
Now, List.merge is simply an alias for List.concat , and map. ... and more which support both Immutable.js collections and plain Objects and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found