mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-07 10:07:48 +00:00
Ensure the lodash underscore version of _.result matches v1.4.4 behavior.
Former-commit-id: c4c1946e49f12ddc4ba2f0f65a9ef7c9727d79ca
This commit is contained in:
@@ -3535,9 +3535,7 @@
|
||||
* // => 'nonsense'
|
||||
*/
|
||||
function result(object, property) {
|
||||
// based on Backbone's private `getValue` function
|
||||
// https://github.com/documentcloud/backbone/blob/0.9.2/backbone.js#L1419-1424
|
||||
var value = object ? object[property] : undefined;
|
||||
var value = object ? object[property] : null;
|
||||
return isFunction(value) ? object[property]() : value;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user