Skip to content

Commit

Permalink
fix recursing usermeta
Browse files Browse the repository at this point in the history
  • Loading branch information
Francisco Treacy committed Feb 14, 2011
1 parent d740c65 commit 26e3a5d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/meta.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,9 @@ class Meta
# ensure links is an array
options.links = [options.links] if options?.links and not Array.isArray(options.links)

@usermeta = Utils.mixin true, {}, defaults, this, options
@usermeta = options?.usermeta or {} # get previous usermeta
@usermeta = Utils.mixin true, @usermeta, defaults, this, options
delete @usermeta.usermeta # remove old, mixed-in usermeta

props = Utils.uniq Meta.riakProperties
.concat(additionalProperties)
Expand Down

0 comments on commit 26e3a5d

Please sign in to comment.