Polyfill fails in IE11 when using Array.from of a Map
See original GitHub issueNormally, 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:
- Created 6 years ago
- Comments:6
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This looks to have been fixed in recent releases of the library.
Any chance this can be given some attention?