You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently pick does not work with proxies but maybe it could be extended like this:
index.js -
DotObject.prototype.pick
- if (obj && typeof obj === 'object' && key in obj) {
+ if (obj && typeof obj === 'object' && Object.getOwnPropertyNames(obj).includes(key)) {
It works in the case if the proxy defines ownKeys() or getOwnPropertyDescriptor(target, key) methods.
Or maybe it could be extended with an option flag for this case?
The text was updated successfully, but these errors were encountered:
Currently pick does not work with proxies but maybe it could be extended like this:
It works in the case if the proxy defines ownKeys() or getOwnPropertyDescriptor(target, key) methods.
Or maybe it could be extended with an option flag for this case?
The text was updated successfully, but these errors were encountered: