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
* add null check for `has` on the path that's not the last bit
fixes#28
* early return for `delete` when value is not object
fixes#28
* use `object.prototype.propertyIsEnumerable instead of `Object.getOwnPropertyDescriptor`
fixes#28
* `has({foo: undefined}, foo) should be `true`
fixes#27
* fix linting
* use `in` for property detection
This change was made in July 2016:
Unfortunately, this change broke my code. Specifically, I was using it like this in the Express framework:
where the
req
object is defined here.Before this change,
foo = 1
was logged.After this change,
foo = undefined
was logged.The problem appears to be that
req.app
isn't an enumerable property because it is an inherited property.So, here's my question: why are we discriminating against inherited properties inside the
get()
method? That doesn't seem right to me.IssueHunt Summary
stroncium has been rewarded.
Backers (Total: $40.00)
Submitted pull Requests
Tips
The text was updated successfully, but these errors were encountered: