1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Do not remove unknown credentials of Subflow Modules

Fixes #3641
This commit is contained in:
Nick O'Leary 2022-07-01 17:34:16 +01:00
parent f760354e82
commit 9ac83cf62e
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9
2 changed files with 8 additions and 6 deletions

View File

@ -391,7 +391,6 @@ class Subflow extends Flow {
name = newName;
}
var parent = this.parent;
if (parent) {
var val = parent.getSetting(name);

View File

@ -373,14 +373,17 @@ var api = module.exports = {
}
}
if (/^subflow(:|$)/.test(nodeType)) {
for (cred in savedCredentials) {
if (savedCredentials.hasOwnProperty(cred)) {
if (!newCreds.hasOwnProperty(cred)) {
console.log(` + ${cred} deleting for some reason`)
delete savedCredentials[cred];
dirty = true;
}
}
}
}
} else {
var dashedType = nodeType.replace(/\s+/g, '-');
var definition = credentialsDef[dashedType];