_.where which iterates over attrs with a for-in (inherited and own props) shouldn't use _.isEmpty (only own properties) to exit early.
attrs in this case is supposed to be a naked object ... so in common use there shouldn't be any difference between using a hasOwnProperty check or not -- but it won't hurt too much to add one.
Fixes #838 -- use hasOwnProperty when looping through _.where attrs, …
…for healthy paranoia's sake
Is this ok? I was really meaning to drop isEmpty use because of existing iteration behavior (own & inherited props). Will changing this to iterating only-own props break Backbone compat?
I preserved the behavior of iterating own & inherited props in lodash by doing this:
It shouldn't break anything. attrs is just an empty object with no enumerable prototype properties to speak of.