Skip to content

Commit

Permalink
fix: account.profile.update() bug (hoodiehq-archive/hoodie-account#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
gr2m committed Jul 18, 2016
1 parent ec46f7b commit 4d2cc35
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/profile-update.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,14 @@ function updateProfile (state, options) {
headers: {
authorization: 'Session ' + state.account.session.id
},
body: internals.serialise('profile', options, state.account.profile.id)
body: internals.serialise('profile', options, state.account.id + '-profile')
})

.then(function () {
if (!state.account.profile) {
state.account.profile = {}
}

merge(state.account.profile, options)
internals.saveAccount({
cacheKey: state.cacheKey,
Expand Down

0 comments on commit 4d2cc35

Please sign in to comment.