Object.defineProperty doesn't fail silently on IE8, it throws errors instead. Docs indicate that it should merely have no effect. Intended behavior or a bug?
👍 ugh, just ran into this.
The docs need an update. Object.defineProperty should not fail silently. I would rather you know that it doesn’t work than find out because of a side-effect. Let me know if you have a use-case where silent failure would be preferable.
@kriskowal I think you're right it should not fail silently, but I am using another 3rd party library who assumes that if you include es5-sham, it will just automatically make Object.defineProperty work in IE8, which it does not. I am adding in a try/catch block and dealing with the issue there (which is how it should be as you point out, thanks) It would be nice to update the docs 🍔