From dff1bf0e92c2d2af61bf209c1a1eecc9670b4fa0 Mon Sep 17 00:00:00 2001
From: Cannonb4ll <dennissmink@gmail.com>
Date: Fri, 17 Nov 2023 10:45:59 +0100
Subject: [PATCH] fx

---
 app/Livewire/Item/Comments.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/Livewire/Item/Comments.php b/app/Livewire/Item/Comments.php
index 35ceb166..0c416b7b 100644
--- a/app/Livewire/Item/Comments.php
+++ b/app/Livewire/Item/Comments.php
@@ -114,7 +114,7 @@ public function render()
     {
         $this->comments = $this->item
             ->comments()
-            ->with('user:id,name,email')
+            ->withWhereHas('user:id,name,email')
             ->orderByRaw('COALESCE(parent_id, id), parent_id IS NOT NULL, id')
             ->when(!auth()->user()?->hasAdminAccess(), fn ($query) => $query->where('private', false))
             ->get()