Skip to content
This repository has been archived by the owner on Jan 12, 2023. It is now read-only.

Commit

Permalink
Merge pull request #4 from jasonvarga/patch-1
Browse files Browse the repository at this point in the history
Use template method
  • Loading branch information
hotmeteor authored Aug 26, 2022
2 parents f10c3de + d2442b5 commit 44dc5e7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/InertiaStatamic.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function handle(Request $request, Closure $next)
{
$page = app(FrontendController::class)->index($request);

if ($page->augmentedValue('template') === 'app' && ($page instanceof Page || $page instanceof Entry)) {
if (($page instanceof Page || $page instanceof Entry) && $page->template() === 'app') {
return Inertia::render(
$this->buildComponentPath($page),
$this->buildProps($page)
Expand Down

0 comments on commit 44dc5e7

Please sign in to comment.