Skip to content

Commit cfd3f5a

Browse files
committed
tweak null check
1 parent 599d6a9 commit cfd3f5a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/Models/Thread.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,12 +142,11 @@ public static function getBySubject($subject)
142142
*/
143143
public function participantsUserIds($userId = null)
144144
{
145-
/** @var \Illuminate\Support\Collection $users */
146145
$users = $this->participants()->withTrashed()->select('user_id')->get()->map(function ($participant) {
147146
return $participant->user_id;
148147
});
149148

150-
if ($userId) {
149+
if ($userId !== null) {
151150
$users->push($userId);
152151
}
153152

0 commit comments

Comments
 (0)