]> BookStack Code Mirror - bookstack/blobdiff - app/References/ReferenceFetcher.php
Customization: Added parent tag classes
[bookstack] / app / References / ReferenceFetcher.php
index 655ea7c09eb2bf8b0c21b7c30f0345b7ab0e3ea7..1c9664f45a9979d8c5e88627b4bb6eaa7547dd1a 100644 (file)
@@ -41,7 +41,8 @@ class ReferenceFetcher
     {
         $baseQuery = Reference::query()
             ->where('to_type', '=', $entity->getMorphClass())
-            ->where('to_id', '=', $entity->id);
+            ->where('to_id', '=', $entity->id)
+            ->whereHas('from');
 
         return $this->permissions->restrictEntityRelationQuery(
             $baseQuery,