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.

Polyfill fails in IE11 when using Array.from of a Map

See original GitHub issue

Normally, applying Array.from to a JavaScript Map results in an array of [key, value] tuples. However, when using polyfill.io with default features in IE11, it results in an array of undefined.

Here is a repro:

var fooMap = new Map()
  .set("key1", "value1")
  .set("key2", "value2");

var fooKeys = Array.from(fooMap.keys());
console.log("first key", fooKeys[0]); // works fine

var fooPairs = Array.from(fooMap);
console.log("first pair", fooPairs[0]); // in IE11, results in an array of undefined instead of key/value tuples

Please see this CodePen for a live demo of the problem.

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
JakeChampioncommented, Feb 21, 2019

This looks to have been fixed in recent releases of the library.

bs_win10_ie_11 0 4

1reaction
devuxercommented, Aug 23, 2018

Any chance this can be given some attention?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Google Maps API complaining in IE11 about polyfill Array.from()
I'm trying to figure out an issue with Google Maps v3 and a polyfill we use for non-ES6 browsers (IE11 for example). The...
Read more >
core-js - npm
Modular standard library for JavaScript. Includes polyfills for ECMAScript up to 2023: promises, symbols, collections, iterators, typed arrays, many other ...
Read more >
React Calendar gives Error on Internet Explorer 11
Install polyfill using the command below. npm install --save @pnp/polyfill-ie11. And then add the below imports to your main .ts file.
Read more >
Array.prototype.flatMap() - JavaScript - MDN Web Docs
The flatMap() method returns a new array formed by applying a given callback function to each element of the array, and then flattening...
Read more >
babel/polyfill
assign , instance methods like Array.prototype.includes , and generator functions (provided you use the regenerator plugin). The polyfill adds to the global ...
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