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

Merge pull request #3826 from Steve-Mcl/backport-3728

Do not remove unknown credentials of Subflow Modules (backport to v2.x)
This commit is contained in:
Nick O'Leary 2022-08-04 13:00:06 +01:00 committed by GitHub
commit 726fac97d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 6 deletions

View File

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

View File

@ -373,11 +373,13 @@ var api = module.exports = {
} }
} }
for (cred in savedCredentials) { if (/^subflow(:|$)/.test(nodeType)) {
if (savedCredentials.hasOwnProperty(cred)) { for (cred in savedCredentials) {
if (!newCreds.hasOwnProperty(cred)) { if (savedCredentials.hasOwnProperty(cred)) {
delete savedCredentials[cred]; if (!newCreds.hasOwnProperty(cred)) {
dirty = true; delete savedCredentials[cred];
dirty = true;
}
} }
} }
} }