Refactor getDeep method

This commit is contained in:
Philip Giuliani 2018-05-30 17:30:10 +02:00
parent 6435ced707
commit a8fa125a96

View File

@ -730,7 +730,7 @@ const utils = {
// Get a nested value in an object
getDeep(object, path) {
return path.split('.').reduce((obj, key) => (obj && obj[key]) || undefined, object);
return path.split('.').reduce((obj, key) => obj && obj[key], object);
},
// Get the closest value in an array