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

Merge pull request #3828 from Steve-Mcl/backport-3762

Fix storing subflow credential type when input has multiple types (backport to v2.x)
This commit is contained in:
Nick O'Leary 2022-08-04 13:00:33 +01:00 committed by GitHub
commit 72661aa159
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -983,6 +983,17 @@ RED.subflow = (function() {
default: inputType default: inputType
}) })
input.typedInput('value',val.value) input.typedInput('value',val.value)
if (inputType === 'cred') {
if (node.credentials) {
if (node.credentials[tenv.name]) {
input.typedInput('value', node.credentials[tenv.name]);
} else if (node.credentials['has_'+tenv.name]) {
input.typedInput('value', "__PWRD__")
} else {
input.typedInput('value', "");
}
}
}
} else { } else {
input.val(val.value) input.val(val.value)
} }