Skip to content

Conversation

@Mike96Angelo
Copy link

There is no need to go through an object's entire prototypal chain to see if the first proto is equal to the last non-null proto in the chain. Just check that the object's prototypal chain has only one non-null proto in its chain.

There is no need to go through an object entire prototypal chain.  If the chain length is 1 then its prototype will be the last one in the chain.
@timdorr
Copy link
Member

timdorr commented Dec 7, 2018

Thanks, you're not wrong, but we're really just bikeshedding at this point. The plain object check is quite fast as-is. If it's what's slowing you down, you probably have other problems to worry about :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants