aboutsummaryrefslogtreecommitdiffstats
path: root/src/js/utils.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/js/utils.js')
-rw-r--r--src/js/utils.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/js/utils.js b/src/js/utils.js
index e04d56e4..ea2dc72d 100644
--- a/src/js/utils.js
+++ b/src/js/utils.js
@@ -729,8 +729,8 @@ const utils = {
},
// Get a nested value in an object
- getDeep(object, value) {
- return value.split('.').reduce((obj, key) => obj[key] || {}, object);
+ getDeep(object, path) {
+ return path.split('.').reduce((obj, key) => (obj && obj[key]) || undefined, object);
},
// Get the closest value in an array