Skip to content

Commit

Permalink
[5.x] Respect the current site when returning a View (#10109)
Browse files Browse the repository at this point in the history
  • Loading branch information
aerni authored May 17, 2024
1 parent d7809ab commit 61f487c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/View/View.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use Illuminate\Support\HtmlString;
use InvalidArgumentException;
use Statamic\Facades\Cascade;
use Statamic\Facades\Site;
use Statamic\Support\Arr;
use Statamic\Support\Str;
use Statamic\View\Antlers\Engine;
Expand Down Expand Up @@ -189,6 +190,7 @@ protected function cascade()
{
return $this->cascade = $this->cascade ?? Cascade::instance()
->withContent($this->cascadeContent)
->withSite(Site::current())
->hydrate()
->toArray();
}
Expand Down

0 comments on commit 61f487c

Please sign in to comment.