Skip to content

Commit f8b5d5d

Browse files
authored
Check first for team owner (#996)
1 parent 51be269 commit f8b5d5d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/HasTeams.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,9 @@ public function belongsToTeam($team)
123123
return false;
124124
}
125125

126-
return $this->teams->contains(function ($t) use ($team) {
126+
return $this->ownsTeam($team) || $this->teams->contains(function ($t) use ($team) {
127127
return $t->id === $team->id;
128-
}) || $this->ownsTeam($team);
128+
});
129129
}
130130

131131
/**

0 commit comments

Comments
 (0)