]> BookStack Code Mirror - bookstack/blobdiff - app/Entities/Tools/SiblingFetcher.php
fix(503): massively simplify the 503 error view
[bookstack] / app / Entities / Tools / SiblingFetcher.php
index 249e0038eeb8d086c25b3c308a973c265d1c628d..617ef4a620df810f9369e8fd8f6e49abed461304 100644 (file)
@@ -5,6 +5,7 @@ namespace BookStack\Entities\Tools;
 use BookStack\Entities\EntityProvider;
 use BookStack\Entities\Models\Book;
 use BookStack\Entities\Models\Bookshelf;
+use BookStack\Entities\Models\Chapter;
 use BookStack\Entities\Models\Page;
 use Illuminate\Support\Collection;
 
@@ -24,7 +25,7 @@ class SiblingFetcher
         }
 
         // Page in book or chapter
-        if (($entity instanceof Page && !$entity->chapter) || $entity->isA('chapter')) {
+        if (($entity instanceof Page && !$entity->chapter) || $entity instanceof Chapter) {
             $entities = $entity->book->getDirectChildren();
         }