Skip to content


Subversion checkout URL

You can clone with
Download ZIP


Fixed issue #19 #20

merged 1 commit into from

2 participants


See issue #19


I'm also an idiot and didn't think of linking this to issue 19 >_<


Guess it's also nice to have somewhere to reproduce this : (Try it in a non - ES5 browser)

The code breaks if your call object.defineProperty with a function as an object since it doesn't allow descriptor to be a function and throws an error when object is a function.

@kriskowal kriskowal merged commit 7d4aecd into es-shims:master


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jun 11, 2011
  1. @Raynos

    Fixed issue #19

    Raynos authored
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  es5-shim.js
2  es5-shim.js
@@ -492,7 +492,7 @@ if (!Object.defineProperty) {
Object.defineProperty = function defineProperty(object, property, descriptor) {
if (typeof object !== "object" && typeof object !== "function")
throw new TypeError(ERR_NON_OBJECT_TARGET + object);
- if (typeof object !== "object" || object === null)
+ if (typeof descriptor !== "object" || descriptor === null)
throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR + descriptor);
// If it's a data property.
Something went wrong with that request. Please try again.