pvorb / clone

deeply clone arbitrary objects in javascript
https://www.npmjs.com/package/clone
MIT License
781 stars 129 forks source link

TypeError: Method _external called on incompatible receiver #<SecureContext> #98

Open tristanls opened 6 years ago

tristanls commented 6 years ago

It appears that Node.js SecureContext does not like getOwnPropertyDescriptor called on it.

TypeError: Method _external called on incompatible receiver #<SecureContext>
at Function.getOwnPropertyDescriptor (<anonymous>)
at _clone (/var/task/node_modules/clone/clone.js:156:24)
at _clone (/var/task/node_modules/clone/clone.js:162:18)
at _clone (/var/task/node_modules/clone/clone.js:162:18)
at _clone (/var/task/node_modules/clone/clone.js:162:18)
at _clone (/var/task/node_modules/clone/clone.js:162:18)
at _clone (/var/task/node_modules/clone/clone.js:162:18)
at _clone (/var/task/node_modules/clone/clone.js:162:18)
at _clone (/var/task/node_modules/clone/clone.js:162:18)
at _clone (/var/task/node_modules/clone/clone.js:162:18)
tristanls commented 6 years ago

The background for this failure appears to be covered in this comment (in general, not for SecureContext in particular).