mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-05 17:37:50 +00:00
Make _.defaults follow _.assign and only assign own properties of source.
Former-commit-id: 114dc47bbfa6db6a53a2fa03dd477fe86c3395cb
This commit is contained in:
@@ -977,7 +977,7 @@
|
||||
}
|
||||
|
||||
/**
|
||||
* Assigns enumerable properties of the default object(s) to the `destination`
|
||||
* Assigns own enumerable properties of source object(s) to the `destination`
|
||||
* object for all `destination` properties that resolve to `null`/`undefined`.
|
||||
* Once a property is set, additional defaults of the same property will be
|
||||
* ignored.
|
||||
@@ -995,7 +995,6 @@
|
||||
* // => { 'flavor': 'chocolate', 'sprinkles': 'rainbow' }
|
||||
*/
|
||||
var defaults = createIterator(assignIteratorOptions, {
|
||||
'useHas': false,
|
||||
'objectLoop': 'if (result[index] == null) ' + assignIteratorOptions.objectLoop
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user