X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/b94b945fb03e21a1997cfe6e50148967586cb26d..refs/pull/2023/head:/app/Entities/Repos/BookshelfRepo.php diff --git a/app/Entities/Repos/BookshelfRepo.php b/app/Entities/Repos/BookshelfRepo.php index 25fa97dae..876f56e10 100644 --- a/app/Entities/Repos/BookshelfRepo.php +++ b/app/Entities/Repos/BookshelfRepo.php @@ -91,10 +91,14 @@ class BookshelfRepo /** * Create a new shelf in the system. */ - public function update(Bookshelf $shelf, array $input, array $bookIds): Bookshelf + public function update(Bookshelf $shelf, array $input, ?array $bookIds): Bookshelf { $this->baseRepo->update($shelf, $input); - $this->updateBooks($shelf, $bookIds); + + if (!is_null($bookIds)) { + $this->updateBooks($shelf, $bookIds); + } + return $shelf; }