fix(editor): Fix issue with existing credential not opening in HTTP agent tool (#10167)

This commit is contained in:
oleg
2024-07-24 14:10:16 +02:00
committed by GitHub
parent 66c49bb6a1
commit 906b4c3c7b
3 changed files with 30 additions and 2 deletions

View File

@@ -430,7 +430,7 @@ const sidebarItems = computed(() => {
const defaultCredentialTypeName = computed(() => {
let defaultName = credentialTypeName.value;
if (!defaultName || defaultName === 'null') {
if (activeNodeType.value?.credentials) {
if (activeNodeType.value?.credentials && activeNodeType.value.credentials.length > 0) {
defaultName = activeNodeType.value.credentials[0].name;
}
}