Skip to content

Commit

Permalink
fix: account.profile.get(unknown) returns undefined not {}
Browse files Browse the repository at this point in the history
  • Loading branch information
gr2m authored and sdvg committed Feb 2, 2017
1 parent a0e7dc7 commit 1cc2edc
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/profile-get.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,10 @@ function profileGet (state, path) {
return undefined
}
var profile = get(state, 'account.profile')
return internals.getProperties(profile, path) || {}

if (!path) {
return profile || {}
}

return internals.getProperties(profile, path)
}

0 comments on commit 1cc2edc

Please sign in to comment.