ensure users is not empty

This commit is contained in:
Denis Duliçi 2023-06-01 13:20:50 +03:00
parent 1a2c7116e5
commit 7241be1df1

View File

@ -10,7 +10,11 @@ class SendInvalidEmailNotification
{
public function handle(Event $event): void
{
$users = company()->users;
$users = company()?->users;
if (empty($users)) {
return;
}
$this->notifyAdminsAboutInvalidContactEmail($event, $users);