Open vkarpov15 opened 6 years ago
Just in case it's not clear, mdn defines descriptors as either being "data" or "accessor" descriptors. The current code assumes only the latter whereas both need to be accounted for.
A data descriptor also has the following optional keys: value... writeable
An accessor descriptor also has the following optional keys: get... set
Hi,
Looks like #36 introduced a bug where prototype properties that don't have a setter won't get copied, even if they are writable. Example:
This issue came up in Automattic/mongoose#5896
Thanks for the great lib and happy holidays!