Skip to content

Commit

Permalink
Throw exception if none of the views exist
Browse files Browse the repository at this point in the history
  • Loading branch information
marco76tv committed Feb 5, 2024
1 parent e5a10d1 commit fcc2463
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions View/Components/Render/Block.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,11 @@ public function render(): \Illuminate\Contracts\View\Factory|\Illuminate\View\Vi
*/
$view = Arr::first($views, static fn (string $view) => view()->exists($view));
if (null === $view) {
<<<<<<< HEAD
throw new \Exception('none of these views exists ['.implode(', '.chr(13), $views).']');
=======
throw new Exception('none of these views exists ['.implode(', '.chr(13),$views).']');
>>>>>>> 7339779 (up)
}
$view_params = $this->block['data'] ?? [];

Expand Down

0 comments on commit fcc2463

Please sign in to comment.