fix(editor): Fix most ts errors in credential components (no-changelog) (#9576)

This commit is contained in:
Tomi Turtiainen
2024-06-03 11:28:41 +03:00
committed by GitHub
parent 379e2da547
commit 0e10c84efd
6 changed files with 51 additions and 51 deletions

View File

@@ -105,8 +105,8 @@ export default defineComponent({
},
props: {
credential: {
type: Object as PropType<ICredentialsResponse>,
required: true,
type: Object as PropType<ICredentialsResponse | null>,
default: null,
},
credentialId: {
type: String,
@@ -162,7 +162,7 @@ export default defineComponent({
return this.credentialsStore.getCredentialOwnerNameById(`${this.credentialId}`);
},
isCredentialSharedWithCurrentUser(): boolean {
return (this.credentialData.sharedWithProjects || []).some((sharee: IUser) => {
return (this.credentialData.sharedWithProjects ?? []).some((sharee: IUser) => {
return sharee.id === this.usersStore.currentUser?.id;
});
},