Browse Source

autofix: fix nested `if` with `else if` (#6807)

Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
deepsource-autofix[bot] 3 years ago
parent
commit
2466da4e82
1 changed files with 2 additions and 4 deletions
  1. 2 4
      internal/context/org.go

+ 2 - 4
internal/context/org.go

@@ -73,10 +73,8 @@ func HandleOrgAssignment(c *Context, args ...bool) {
 			c.Org.IsMember = true
 			c.Org.IsTeamMember = true
 			c.Org.IsTeamAdmin = true
-		} else {
-			if org.IsOrgMember(c.User.ID) {
-				c.Org.IsMember = true
-			}
+		} else if org.IsOrgMember(c.User.ID) {
+			c.Org.IsMember = true
 		}
 	} else {
 		// Fake data.