Merge pull request #8683 from jakemcdermott/fix-8605

Avoid prop reference error when saving cred

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
softwarefactory-project-zuul[bot] 2020-12-16 22:27:25 +00:00 committed by GitHub
commit 793764283d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -43,7 +43,7 @@ function CredentialAdd({ me }) {
possibleFields.forEach(field => {
const input = inputs[field.id];
if (input.credential && input.inputs) {
if (input?.credential && input?.inputs) {
pluginInputs[field.id] = input;
} else if (passwordPrompts[field.id]) {
nonPluginInputs[field.id] = 'ASK';

View File

@ -39,7 +39,7 @@ function CredentialEdit({ credential, me }) {
possibleFields.forEach(field => {
const input = inputs[field.id];
if (input.credential && input.inputs) {
if (input?.credential && input?.inputs) {
pluginInputs[field.id] = input;
} else if (passwordPrompts[field.id]) {
nonPluginInputs[field.id] = 'ASK';