Skip to content

Instantly share code, notes, and snippets.

@poying
Last active January 3, 2016 04:58
Show Gist options
  • Save poying/8412361 to your computer and use it in GitHub Desktop.
Save poying/8412361 to your computer and use it in GitHub Desktop.
Object.getPropertyDescriptor || (Object.getPropertyDescriptor = function (obj, name) {
var desc;
while (obj) {
desc = Object.getOwnPropertyDescriptor(obj, name);
if (desc) {
desc.configurable = true;
return desc;
}
obj = Object.getPrototypeOf(obj);
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment