1
0
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:
Steve-Mcl 2022-04-23 11:20:21 +01:00
parent 013af7619e
commit 856d2ab266

View File

@ -58,11 +58,6 @@ module.exports = function(RED) {
if(filename == "") { //was using empty value to denote msg.filename
node.filename = "filename";
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
node.filenameType = "str";
}
@ -305,11 +300,6 @@ module.exports = function(RED) {
if(filename == "") { //was using empty value to denote msg.filename
node.filename = "filename";
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
node.filenameType = "str";
}