mirror of
https://github.com/filamentphp/filament.git
synced 2026-09-24 15:42:09 +08:00
Merge pull request #17368 from tanthammar/patch-15
Fix array_reduce() error in InteractsWithToolbarButtons.php
This commit is contained in:
@@ -31,7 +31,7 @@ trait InteractsWithToolbarButtons
|
||||
}
|
||||
|
||||
$this->toolbarButtons = array_reduce(
|
||||
$this->toolbarButtons,
|
||||
$this->toolbarButtons ?? [],
|
||||
function ($carry, $button) use ($buttonsToDisable) {
|
||||
if (is_array($button)) {
|
||||
$carry[] = array_values(array_filter(
|
||||
@@ -60,7 +60,7 @@ trait InteractsWithToolbarButtons
|
||||
}
|
||||
|
||||
$this->toolbarButtons = [
|
||||
...$this->toolbarButtons,
|
||||
...$this->toolbarButtons ?? [],
|
||||
...$buttonsToEnable,
|
||||
];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user