소스 검색

Fix discover bug

Daniel Supernault 7 년 전
부모
커밋
ff860c9b85
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. 4 1
      app/Http/Controllers/DiscoverController.php

+ 4 - 1
app/Http/Controllers/DiscoverController.php

@@ -29,7 +29,10 @@ class DiscoverController extends Controller
                   ->whereIn('filter_type', ['mute', 'block'])
                   ->pluck('filterable_id');
         $following->push($pid);
-        $following->push($filtered);
+        
+        if($filtered->count() > 0) {
+          $following->push($filtered);
+        }
 
         $people = Profile::inRandomOrder()
           ->whereNotIn('id', $following)