Skip to content

Commit b7d0f61

Browse files
committed
update dig to return immediately if object passed in is null
1 parent faf14bd commit b7d0f61

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/helpers/dig.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
'use strict'
22

33
module.exports = (object, path) => {
4+
if (object == null) return
45
const paths = path.split('.')
56
let result = object
67
for (let i = 0, len = paths.length; i < len; i++) {

0 commit comments

Comments
 (0)