mirror of
https://github.com/usetrmnl/byos_laravel.git
synced 2026-01-13 23:18:10 +00:00
fix: error when user has not plugins
This commit is contained in:
parent
1f0771a19c
commit
6a05544529
1 changed files with 2 additions and 2 deletions
|
|
@ -52,11 +52,11 @@ new class extends Component {
|
|||
|
||||
public function mount(): void
|
||||
{
|
||||
$userPlugins =auth()->user()->plugins->map(function ($plugin) {
|
||||
$userPlugins =auth()->user()?->plugins?->map(function ($plugin) {
|
||||
return $plugin->toArray();
|
||||
})->toArray();
|
||||
|
||||
$this->plugins = array_merge($this->native_plugins, $userPlugins);
|
||||
$this->plugins = array_merge($this->native_plugins, $userPlugins ?? []);
|
||||
}
|
||||
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue