X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/cf04a0d818b7c973ad20a7a49308629c738ca73d..refs/pull/2515/head:/app/Actions/ViewService.php diff --git a/app/Actions/ViewService.php b/app/Actions/ViewService.php index ec57cdb76..51a60d96e 100644 --- a/app/Actions/ViewService.php +++ b/app/Actions/ViewService.php @@ -74,7 +74,12 @@ class ViewService $query->whereIn('viewable_type', $this->entityProvider->getMorphClasses($filterModels)); } - return $query->with('viewable')->skip($skipCount)->take($count)->get()->pluck('viewable'); + return $query->with('viewable') + ->skip($skipCount) + ->take($count) + ->get() + ->pluck('viewable') + ->filter(); } /**