Skip to content

Commit c5c8c42

Browse files
committed
unset element variables when injectElementAsProp setting is false
1 parent 4fba54f commit c5c8c42

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/controllers/BaseController.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,8 @@ public function actionIndex(): array|string
9797
$props = $jsonData['props'] ?? [];
9898

9999
if (Inertia::getInstance()->settings->injectElementAsProp !== true) {
100-
unset($templateVariables['element']);
100+
unset($templateVariables['entry']);
101+
unset($templateVariables['category']);
101102
}
102103

103104
// Merge $props with $templateVariables, $props takes precedence

0 commit comments

Comments
 (0)