Skip to content

Commit

Permalink
(bug): fix #232 undefined deep values
Browse files Browse the repository at this point in the history
  • Loading branch information
amcdnl committed Oct 28, 2016
1 parent c207063 commit 00cebc0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/utils/deep-getter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ export function deepValueGetter(obj, path) {
if(split.length) {
for(let i = 0, len = split.length; i < len; i++) {
current = current[split[i]];

// if found undefined, return empty string
if(current === undefined) return '';
}
}

Expand Down

0 comments on commit 00cebc0

Please sign in to comment.