Permalink
Browse files

Fix issue #26: Queued notification overwrites previous

Since the defaults object is being passed by reference rather than
cloned, every queued notification will share the same html, options and
callback. This commit creates a shallow clone instead
  • Loading branch information...
1 parent bba7573 commit 6ba613794040d136dae0bdf949bb486dc2ad7916 @JensRoland JensRoland committed Jul 3, 2012
Showing with 4 additions and 1 deletion.
  1. +4 −1 humane.js
View
@@ -181,7 +181,10 @@
else if (cb) cb()
},
log: function (html, o, cb, defaults) {
- var msg = defaults || {}
+ var msg = {}
+ if (defaults)
+ for (var opt in defaults)
+ msg[opt] = defaults[opt]
if (typeof o == 'function') cb = o
else if (o)

0 comments on commit 6ba6137

Please sign in to comment.