Skip to content

Commit

Permalink
do not hardcode the items field name
Browse files Browse the repository at this point in the history
  • Loading branch information
mjauvin committed Oct 23, 2024
1 parent 2236a1e commit 46a1eb9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion formwidgets/MenuItems.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public function prepareVars()
$menuItem = new MenuItem;

$this->vars['itemProperties'] = json_encode($menuItem->fillable);
$this->vars['items'] = $this->model->items;
$this->vars['items'] = $this->model->{$this->fieldName};

$emptyItem = new MenuItem;
$emptyItem->title = trans($this->newItemTitle);
Expand Down

0 comments on commit 46a1eb9

Please sign in to comment.