mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
remove unecessary ${ENV_VAR} test
This commit is contained in:
parent
013af7619e
commit
856d2ab266
@ -58,11 +58,6 @@ module.exports = function(RED) {
|
|||||||
if(filename == "") { //was using empty value to denote msg.filename
|
if(filename == "") { //was using empty value to denote msg.filename
|
||||||
node.filename = "filename";
|
node.filename = "filename";
|
||||||
node.filenameType = "msg";
|
node.filenameType = "msg";
|
||||||
} else if(/^\${[^}]+}$/.test(filename)) { //was using an ${ENV_VAR}
|
|
||||||
node.filenameType = "env";
|
|
||||||
node.filename = filename.replace(/\${([^}]+)}/g, function(match, name) {
|
|
||||||
return (name === undefined)?"":name;
|
|
||||||
});
|
|
||||||
} else { //was using a static filename - set typedInput type to str
|
} else { //was using a static filename - set typedInput type to str
|
||||||
node.filenameType = "str";
|
node.filenameType = "str";
|
||||||
}
|
}
|
||||||
@ -305,11 +300,6 @@ module.exports = function(RED) {
|
|||||||
if(filename == "") { //was using empty value to denote msg.filename
|
if(filename == "") { //was using empty value to denote msg.filename
|
||||||
node.filename = "filename";
|
node.filename = "filename";
|
||||||
node.filenameType = "msg";
|
node.filenameType = "msg";
|
||||||
} else if(/^\${[^}]+}$/.test(filename)) { //was using an ${ENV_VAR}
|
|
||||||
node.filenameType = "env";
|
|
||||||
node.filename = filename.replace(/\${([^}]+)}/g, function(match, name) {
|
|
||||||
return (name === undefined)?"":name;
|
|
||||||
});
|
|
||||||
} else { //was using a static filename - set typedInput type to str
|
} else { //was using a static filename - set typedInput type to str
|
||||||
node.filenameType = "str";
|
node.filenameType = "str";
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user