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

IE11 Polyfill: Array.protoype.includes property is enumerable #197

Open
apapko opened this issue Sep 22, 2017 · 0 comments
Open

IE11 Polyfill: Array.protoype.includes property is enumerable #197

apapko opened this issue Sep 22, 2017 · 0 comments

Comments

@apapko
Copy link

apapko commented Sep 22, 2017

Array.prototype.includes property is enumerable. IE11 Console: Object.getOwnPropertyDescriptor(Array.prototype, 'includes') ---> reveals:

enumerable: true,
configurable: true,
writable: true

Should be: {writable: true, enumerable: false, configurable: true}

Please correct the following polyfill

From:
Array.prototype.includes = function includes(searchElement /, fromIndex/ )
To:
Array.prototype.includes = Object.defineProperty( Array.prototype, 'includes', {
configurable: true,
writable: true,
value: function includes(searchElement /, fromIndex/ ) {...}
})
( enumerable: false, is the default value )

Example in properties.keys

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant