Skip to content
This repository has been archived by the owner on Apr 19, 2023. It is now read-only.

Commit

Permalink
🐛 Fix bug with removing member
Browse files Browse the repository at this point in the history
  • Loading branch information
AnandChowdhary committed Oct 4, 2019
1 parent ceb04ab commit d3321ab
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "staart-manager",
"version": "1.1.40",
"version": "1.1.41",
"main": "index.js",
"repository": "[email protected]:AnandChowdhary/staart.git",
"author": "Anand Chowdhary <[email protected]>",
Expand Down Expand Up @@ -147,5 +147,5 @@
"setup"
],
"snyk": true,
"staart-version": "1.1.40"
"staart-version": "1.1.41"
}
2 changes: 1 addition & 1 deletion src/rest/organization.ts
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,7 @@ export const deleteOrganizationMembershipForUser = async (
) {
// Check if there's only one member in this team
const members = await getOrganizationMemberships(organizationId);
if (members && members.data && members.length === 1)
if (members && members.data && members.data.length === 1)
throw new Error(ErrorCode.CANNOT_DELETE_SOLE_MEMBER);
return await deleteOrganizationMembership(organizationId, membershipId);
}
Expand Down

0 comments on commit d3321ab

Please sign in to comment.