Skip to content

Commit

Permalink
fix(settings): appending the me-contact only if it is not null (#6728)
Browse files Browse the repository at this point in the history
Co-authored-by: Alexis Saettler <alexis@saettler.org>
  • Loading branch information
alaa-alsalehi and asbiin authored Oct 31, 2023
1 parent 0dfbc17 commit 3799ab5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/Http/Controllers/SettingsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ public function index()
if (auth()->user()->me_contact_id) {
$meContact = Contact::where('account_id', auth()->user()->account_id)
->find(auth()->user()->me_contact_id);
$existingContacts->prepend($meContact);
if ($meContact) {
$existingContacts->prepend($meContact);
}
}

$accountHasLimitations = AccountHelper::hasLimitations(auth()->user()->account);
Expand Down

0 comments on commit 3799ab5

Please sign in to comment.