Skip to content

Commit

Permalink
fix: evaluate potential closure value before rendering component
Browse files Browse the repository at this point in the history
  • Loading branch information
mallardduck committed Mar 6, 2024
1 parent 6efe702 commit 6ad532e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,10 +112,10 @@ protected function getActions(): array
Group::make()
->statePath('data')
->whenTruthy('type')
->schema(function (Get $get) {
->schema(function (Get $get, Component $component) {
$type = $get('type');

return SkyPlugin::get()->getItemTypes()[$type]['fields'] ?? [];
return $component->evaluate(SkyPlugin::get()->getItemTypes()[$type]['fields']) ?? [];
}),
Group::make()
->statePath('data')
Expand Down

0 comments on commit 6ad532e

Please sign in to comment.