refactor(editor): Fix typescript issues in components (no-changelog) (#9580)

This commit is contained in:
Elias Meire
2024-05-31 16:27:56 +02:00
committed by GitHub
parent e23420d89d
commit 3227f6c13e
20 changed files with 57 additions and 58 deletions

View File

@@ -243,7 +243,6 @@ export default defineComponent({
},
node: {
type: Object as PropType<INode>,
required: true,
},
path: {
type: String,
@@ -308,7 +307,8 @@ export default defineComponent({
return !!(node?.credentials && Object.keys(node.credentials).length === 1);
},
credentialsNotSet(): boolean {
const nodeType = this.nodeTypesStore.getNodeType(this.node?.type);
if (!this.node) return false;
const nodeType = this.nodeTypesStore.getNodeType(this.node.type);
if (nodeType) {
const usesCredentials =
nodeType.credentials !== undefined && nodeType.credentials.length > 0;
@@ -387,8 +387,8 @@ export default defineComponent({
filter: string;
} {
return {
parameters: this.node.parameters,
credentials: this.node.credentials,
parameters: this.node?.parameters ?? {},
credentials: this.node?.credentials ?? {},
filter: this.searchFilter,
};
},
@@ -561,7 +561,8 @@ export default defineComponent({
this.uiStore.openExistingCredential(id);
},
createNewCredential(): void {
const nodeType = this.nodeTypesStore.getNodeType(this.node?.type);
if (!this.node) return;
const nodeType = this.nodeTypesStore.getNodeType(this.node.type);
if (!nodeType) {
return;
}
@@ -667,6 +668,10 @@ export default defineComponent({
return;
}
if (!this.node) {
return;
}
let paginationToken: string | undefined;
try {