fix(editor): Fix credential icon for old node type version (#7843)

If a credential was for a node's older version, its icon was not shown.
This commit is contained in:
Tomi Turtiainen
2023-11-28 15:14:22 +02:00
committed by GitHub
parent a37f1cb0ba
commit 4074107511
7 changed files with 1115 additions and 47 deletions

View File

@@ -44,8 +44,11 @@ export default defineComponent({
const nodeType = this.credentialWithIcon.icon.replace('node:', '');
return this.nodeTypesStore.getNodeType(nodeType);
}
const nodesWithAccess = this.credentialsStore.getNodesWithAccess(this.credentialTypeName);
if (!this.credentialTypeName) {
return null;
}
const nodesWithAccess = this.credentialsStore.getNodesWithAccess(this.credentialTypeName);
if (nodesWithAccess.length) {
return nodesWithAccess[0];
}