diff --git a/src/InertiaStatamic.php b/src/InertiaStatamic.php index 9d2d82c..45b0a76 100644 --- a/src/InertiaStatamic.php +++ b/src/InertiaStatamic.php @@ -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)