diff --git a/lib/notify.js b/lib/notify.js index f3e1e0d39..d99fa95d3 100644 --- a/lib/notify.js +++ b/lib/notify.js @@ -19,9 +19,9 @@ var handleNotify = function(metadata, notifyEntry) { } // provides fallback support, it's accept an Object {} and Array of {} - if ( config.notify.headers && Array.isArray(config.notify.headers) ) { + if ( notifyEntry.headers && Array.isArray(notifyEntry.headers) ) { var header = {}; - config.notify.headers.map(function(item) { + notifyEntry.headers.map(function(item) { if (Object.is(item, item)) { for (var key in item) { header[key] = item[key]; @@ -29,8 +29,8 @@ var handleNotify = function(metadata, notifyEntry) { } }); options.headers = header; - } else if (Object.is(config.notify.headers, config.notify.headers)) { - options.headers = config.notify.headers; + } else if (Object.is(notifyEntry.headers, notifyEntry.headers)) { + options.headers = notifyEntry.headers; } options.method = notifyEntry.method