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

Object.getOwnPropertyNames polyfill returns META properties #427

Closed
adamnoakes opened this issue Sep 3, 2018 · 2 comments · May be fixed by MaxMood96/core-js#3 or MaxMood96/core-js#4
Closed

Object.getOwnPropertyNames polyfill returns META properties #427

adamnoakes opened this issue Sep 3, 2018 · 2 comments · May be fixed by MaxMood96/core-js#3 or MaxMood96/core-js#4
Labels

Comments

@adamnoakes
Copy link

When using Object.freeze polyfill and Object.getOwnPropertyNames polyfill together, META properties are outputted. The issue does not exist if i also use the es6.symbol polyfill which replaces the getOwnPropertyNames with a function which checks for META.

var $getOwnPropertyNames = function getOwnPropertyNames(it) {
var names = gOPN(toIObject(it));
var result = [];
var i = 0;
var key;
while (names.length > i) {
if (!has(AllSymbols, key = names[i++]) && key != HIDDEN && key != META) result.push(key);
} return result;
};
. Should the standard polyfill not do this? I don't want to have to import es6.symbol to get around it.

Version 2.5.7

@zloirock
Copy link
Owner

Thanks, I'll explore this problem.

@adamnoakes
Copy link
Author

Thanks @zloirock

@zloirock zloirock added the bug label May 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants