Javascript – Object is possibly 'undefined' in vue3 typescript
The code below is based on vue3 with typescript used. export interface TenantDto { uuid: string; name: string; } export const useTenantStore = defineStore('tenant', { state: () => ({ tenants: [], }), actions: { setMyTenants: (payload: TenantDto[]) => { this.tenants…