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

Map does not work as expected in IE for empty string keys in the latest version #536

Closed
fengzhenqiong opened this issue Mar 7, 2020 · 1 comment
Assignees
Labels
bug Something isn't working library Relates to an Origami library

Comments

@fengzhenqiong
Copy link

Problem

The Map.prototype.get and Map.prototype.set does not work as expected in IE 11.

Details

I'm referring polyfill.js with script tag like this

<script src="//cdn.polyfill.io/v3/polyfill.min.js"></script>

And this will always refers to the latest published version of polyfill.js.

When I tried to use the Map in IE like this:

var map = new Map();
map.set("", "test value");
console.log(map.get(""));

the result will be undefined but not the expected value "test value";

Actually IE 11 does support Map.prototype.get and Map.prototype.set and they work fine, but the polyfill make them erroneous.

Problematic versions

I also tried the old versions of polyfill.js and it worked fine until version 3.42.0 and this problem starts to show up since version 3.43.0 and still exists in the newest version 3.52.3.

Additional information

Win 7 Enterprise x64 SP1
IE x64 11.0.9600.17843

@JakeChampion JakeChampion self-assigned this Mar 7, 2020
@JakeChampion JakeChampion transferred this issue from polyfillpolyfill/polyfill-service Mar 7, 2020
@JakeChampion JakeChampion added bug Something isn't working library Relates to an Origami library labels Mar 24, 2020
@JakeChampion
Copy link
Owner

Looks like a regression from the performance refactor we did on Map and Set. This PR will fix it and ensure we don't regress again -- #557

Origami ✨ automation moved this from incoming to complete Apr 4, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 2, 2020
@robertboulton robertboulton removed this from Done in Origami ✨ Jul 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working library Relates to an Origami library
Projects
None yet
Development

No branches or pull requests

2 participants