fix: Prevent workflow breaking when credential type is unknown (#6923)

This commit is contained in:
Mutasem Aldmour
2023-08-14 14:55:38 +02:00
committed by GitHub
parent 297c3c91f2
commit e83b93f293
8 changed files with 51 additions and 60 deletions

View File

@@ -304,7 +304,7 @@ export default defineComponent({
// If there is already selected type, use it
if (this.selectedCredential !== '') {
return this.credentialsStore.getCredentialTypeByName(this.selectedCredential);
return this.credentialsStore.getCredentialTypeByName(this.selectedCredential) ?? null;
} else if (this.requiredCredentials) {
// Otherwise, use credential type that corresponds to the first auth option in the node definition
const nodeAuthOptions = getNodeAuthOptions(this.activeNodeType);