fix(editor): Add optional chaining to currentWorkflow in NodeSettings (no-changelog) (#11371)

This commit is contained in:
Alex Grozav 2024-11-01 15:36:32 +02:00 committed by GitHub
parent c773181a3a
commit 4ef804c8d3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -124,7 +124,7 @@ const currentWorkflow = computed(() =>
);
const hasForeignCredential = computed(() => props.foreignCredentials.length > 0);
const isHomeProjectTeam = computed(
() => currentWorkflow.value.homeProject?.type === ProjectTypes.Team,
() => currentWorkflow.value?.homeProject?.type === ProjectTypes.Team,
);
const isReadOnly = computed(
() => props.readOnly || (hasForeignCredential.value && !isHomeProjectTeam.value),