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

AppleWebKit/533.1: Object.getOwnPropertyDescriptor() doesn't report number-coerceable properties #495

Closed
bard opened this issue Mar 19, 2019 · 1 comment

Comments

@bard
Copy link

bard commented Mar 19, 2019

This is a bug in a JavaScript engine, not in core-js. It can be worked around in a polyfill. To the best of my knowledge, no polyfill library currently does.

import 'core-js/features/object/get-own-property-descriptor'

const obj = {
  '_123': 'bar',
  '123': 'foo',
}
console.error(Object.getOwnPropertyDescriptor(obj, '_123'))
// => {"value":"bar","writable":true,"enumerable":true,"configurable":true} 

console.log(Object.getOwnPropertyDescriptor(obj, '123'))
// => undefined

User agent: AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1

Core-js version tested: 3.0.0-beta.19

Repro: https://github.com/bard/repro-immer-numeric-properties-pre-es5/blob/master/minimal.js

Workaround: immerjs/immer#336 (comment)

@zloirock
Copy link
Owner

Since I wanna drop ES3 support in core-js@4 and it's Safari 4 issue, closed as wontfix.

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

No branches or pull requests

2 participants