wavded/humane-js — pull request #27 by JensRoland (2012-07-03 20:51:21+00:00)
Title: Queued notification overwrites previous

The `log()` function on line 183-184:

log: function (html, o, cb, defaults) {
var msg = defaults || {}

Since the `defaults` object is being passed by reference rather than cloned, every queued notification will share the same html, options and callback. My proposed fix does a shallow clone:

log: function (html, o, cb, defaults) {
var msg = {}
if (defaults)
for (var opt in defaults)
msg[opt] = defaults[opt]