mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Slightly cleaner fasly checks
This commit is contained in:
parent
3123a5ee51
commit
7916dc9c05
@ -111,7 +111,6 @@ module.exports = function(RED) {
|
|||||||
|
|
||||||
const headerName = keyType === 'other' ? keyValue : keyType;
|
const headerName = keyType === 'other' ? keyValue : keyType;
|
||||||
let headerValue;
|
let headerValue;
|
||||||
let result;
|
|
||||||
|
|
||||||
switch(valueType){
|
switch(valueType){
|
||||||
case 'other':
|
case 'other':
|
||||||
@ -120,11 +119,7 @@ module.exports = function(RED) {
|
|||||||
|
|
||||||
case 'env':
|
case 'env':
|
||||||
case 'global':
|
case 'global':
|
||||||
result = RED.util.evaluateNodeProperty(valueValue,valueType,node);
|
headerValue = RED.util.evaluateNodeProperty(valueValue,valueType,node);
|
||||||
if(!result){
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
headerValue = result
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@ -132,7 +127,9 @@ module.exports = function(RED) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
options.headers[headerName] = headerValue
|
if(headerName && headerValue){
|
||||||
|
options.headers[headerName] = headerValue
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user