mirror of
https://github.com/verdaccio/verdaccio.git
synced 2025-02-17 23:45:29 -05:00
Fixed Changed headers array to be local to notifyEntry
This commit is contained in:
parent
7d62824936
commit
adb40fc5f4
1 changed files with 4 additions and 4 deletions
|
@ -19,9 +19,9 @@ var handleNotify = function(metadata, notifyEntry) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// provides fallback support, it's accept an Object {} and Array of {}
|
// 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 = {};
|
var header = {};
|
||||||
config.notify.headers.map(function(item) {
|
notifyEntry.headers.map(function(item) {
|
||||||
if (Object.is(item, item)) {
|
if (Object.is(item, item)) {
|
||||||
for (var key in item) {
|
for (var key in item) {
|
||||||
header[key] = item[key];
|
header[key] = item[key];
|
||||||
|
@ -29,8 +29,8 @@ var handleNotify = function(metadata, notifyEntry) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
options.headers = header;
|
options.headers = header;
|
||||||
} else if (Object.is(config.notify.headers, config.notify.headers)) {
|
} else if (Object.is(notifyEntry.headers, notifyEntry.headers)) {
|
||||||
options.headers = config.notify.headers;
|
options.headers = notifyEntry.headers;
|
||||||
}
|
}
|
||||||
|
|
||||||
options.method = notifyEntry.method
|
options.method = notifyEntry.method
|
||||||
|
|
Loading…
Add table
Reference in a new issue