| Index: polyfill.js |
| diff --git a/polyfill.js b/polyfill.js |
| index f80c98f6ee6efed6b1da4d2fca0107723985f736..fb11bfad187b30ebd060878c748d3fad9ccfb781 100644 |
| --- a/polyfill.js |
| +++ b/polyfill.js |
| @@ -78,7 +78,13 @@ |
| if (!func) |
| return; |
| - let descriptor = Object.getOwnPropertyDescriptor(object, name); |
| + let descriptor; |
| + let objectProto = object; |
| + do |
|
Manish Jethani
2018/02/15 13:17:51
By the way I find this nicer too:
let descrip
|
| + { |
| + descriptor = Object.getOwnPropertyDescriptor(objectProto, name); |
| + } |
| + while (!descriptor && (objectProto = Object.getPrototypeOf(objectProto))); |
|
Manish Jethani
2018/02/15 09:59:24
I think we should have a separate function called
|
| delete descriptor["get"]; |
| delete descriptor["set"]; |