mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-11 11:27:50 +00:00
Remove source initialization from matches.
This commit is contained in:
@@ -7828,11 +7828,10 @@
|
|||||||
* // => { 'name': 'barney', 'age': 36 }
|
* // => { 'name': 'barney', 'age': 36 }
|
||||||
*/
|
*/
|
||||||
function matches(source) {
|
function matches(source) {
|
||||||
source || (source = {});
|
|
||||||
var props = keys(source),
|
var props = keys(source),
|
||||||
propsLength = props.length,
|
propsLength = props.length,
|
||||||
key = props[0],
|
key = props[0],
|
||||||
value = source[key];
|
value = propsLength && source[key];
|
||||||
|
|
||||||
// fast path the common case of providing an object with a single
|
// fast path the common case of providing an object with a single
|
||||||
// property containing a primitive value
|
// property containing a primitive value
|
||||||
|
|||||||
Reference in New Issue
Block a user