Skip to content

Commit fa447f3

Browse files
committed
Add limit when retrieving first
1 parent 84230aa commit fa447f3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/MessageQuery.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -786,7 +786,7 @@ protected function populate(Collection $uids): MessageCollection
786786
*/
787787
public function first(): ?Message
788788
{
789-
return $this->get()->first();
789+
return $this->limit(1)->get()->first();
790790
}
791791

792792
/**

0 commit comments

Comments
 (0)